def SetOutputFileName(filename=None):
 SetOutputFile()
 if filename:
  SetOutputFile(open(filename, 'w'), 1)

def SetOutputFileName ( filename = None ) : SetOutputFile ( ) if filename : SetOutputFile ( open ( filename , 'w' ) , 1 )
call this with a filename to make it the output file .