Changeset 4270 for anuga_core/source/anuga/abstract_2d_finite_volumes
- Timestamp:
- Feb 19, 2007, 2:25:18 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/util.py
r4248 r4270 502 502 ##################### end of obsolete stuff ? ############ 503 503 504 def start_screen_catcher(dir_name, myid=0, numprocs=1): 504 def start_screen_catcher(dir_name, myid=0, numprocs=1, print_to_screen=False, 505 verbose=False): 505 506 """Used to store screen output and errors to file, if run on multiple 506 507 processes eachprocessor will have its own output and error file. … … 509 510 dir_name = dir_name 510 511 if access(dir_name,W_OK) == 0: 511 print 'Make directory %s' %dir_name 512 if verbose: print 'Make directory %s' %dir_name 513 if verbose: print "myid", myid 512 514 mkdir (dir_name,0777) 513 515 screen_output_name = dir_name + "screen_output_%d_%d.txt" %(myid,numprocs) 514 516 screen_error_name = dir_name + "screen_error_%d_%d.txt" %(myid,numprocs) 515 517 print screen_output_name 516 518 #used to catch screen output to file 517 519 sys.stdout = Screen_Catcher(screen_output_name) … … 533 535 fid = open(self.filename, 'a') 534 536 fid.write(stuff) 537 # if print_to_screen: print stuff 535 538 536 539 def get_revision_number():
Note: See TracChangeset
for help on using the changeset viewer.