Changeset 12977 for fact/tools/pyscripts


Ignore:
Timestamp:
03/01/12 08:29:54 (13 years ago)
Author:
neise
Message:
debugged wrong handling of option_str in __init__
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/pyscripts/pyfact/SignalGenerator.py

    r12976 r12977  
    5555
    5656    def __call__(self, option_str = ''):
    57         self.option_str = option_str.lower()
    58         if self.option_str:
     57        if option_str:
     58            self.option_str = option_str.lower()
    5959            self.options = make_options_from_str(self.option_str)
    6060            self.parse_options()
     
    120120if __name__ == '__main__':
    121121    """ test the class """
    122     myGenerator = SignalGenerator()
    123     sig = myGenerator('len 100 noise 0.3 bsl -2.5 step 20.3 12 24 triangle 10.2 50 10 30 spike 2 50. 20 50')
     122    myGenerator = SignalGenerator('len 100 noise 0.3 bsl -2.5 step 20.3 12 24 triangle 10.2 50 10 30 spike 2 50. 20 50')
     123    sig = myGenerator()
    124124    print myGenerator
    125     plotter(sig, myGenerator.option_str)
     125    plotter(sig, myGenerator.option_str)   
Note: See TracChangeset for help on using the changeset viewer.