Changeset 4270
- Timestamp:
- Feb 19, 2007, 2:25:18 PM (18 years ago)
- Location:
- anuga_core/source/anuga
- Files:
-
- 2 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(): -
anuga_core/source/anuga/caching/caching.py
r4198 r4270 1323 1323 import types 1324 1324 1325 # On some architectures None gets different hash values1325 # On some architectures None, False and True gets different hash values 1326 1326 if T is None: 1327 return(-1) 1328 if T is False: 1329 return(0) 1330 if T is True: 1327 1331 return(1) 1328 1332
Note: See TracChangeset
for help on using the changeset viewer.