Ejemplo n.º 1
0
 def stop(self):
     App.stop(self)
     return self.output.text  # result = saved output
 def help(self):
     App.help(self)
     print '-i <input-file |"-">  (default: stdin  or per app)'
     print '-o <output-file|"-">  (default: stdout or per app)'
Ejemplo n.º 3
0
 def __init__(self, text=''):
     App.__init__(self)  # i/o reset to classes
     self.input = Input(text)  # use internal string i/o
     self.output = Output()
     self.input_name = '<internal>'
     self.output_name = '<internal>'
 def __init__(self, ifile='-', ofile='-'):
     App.__init__(self)                              # call superclass init
     self.setInput( ifile or self.name + '.in')      # default i/o file names
     self.setOutput(ofile or self.name + '.out')     # unless '-i', '-o' args
 def help(self):
     App.help(self)
     print '-i <input-file |"-">  (default: stdin  or per app)'
     print '-o <output-file|"-">  (default: stdout or per app)'
 def __init__(self, ifile='-', ofile='-'):
     App.__init__(self)  # call superclass init
     self.setInput(ifile or self.name + '.in')  # default i/o file names
     self.setOutput(ofile or self.name + '.out')  # unless '-i', '-o' args
 def stop(self): 
     App.stop(self)
     return self.output.text             # result = saved output
 def __init__(self, text=''):
     App.__init__(self)                  # i/o reset to classes
     self.input  = Input(text)           # use internal string i/o
     self.output = Output() 
     self.input_name  = '<internal>'
     self.output_name = '<internal>'