Changeset 2701


Ignore:
Timestamp:
Apr 11, 2006, 5:10:28 PM (19 years ago)
Author:
nick
Message:

added functionality, now can print screen output to file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/util.py

    r2679 r2701  
    486486    return utilities.polygon.populate_polygon(*args, **kwargs)   
    487487
     488'''
     489this simply catches the screen output and files it to a file
     490'''
     491from os import sep
     492
     493class Screen_Catcher:
     494
     495    def __init__(self, filename):
     496        self.data = ''
     497        self.filename = filename
     498
     499    def write(self, stuff):
     500        fid = open(self.filename, 'w')
     501        self.data = self.data + stuff
     502        fid.write(self.data)
     503        fid.close()
Note: See TracChangeset for help on using the changeset viewer.