Changeset 442


Ignore:
Timestamp:
08/25/2011 06:11:35 PM (11 years ago)
Author:
marcus
Message:
  • use searchpath as defined in configuration file
  • all present commands pass tests
Location:
SHX/trunk/SeismicHandler
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • SHX/trunk/SeismicHandler/commands/echo_ch.py

    r296 r442  
    9090    echo_ch("test2") 
    9191#    echo_ch() 
    92     from SeismicHandler.modules.parse import parse 
    93     echo_ch(**(parse("echo_ch test2/new").parsed)) 
     92    from SeismicHandler.modules.parse import Parse 
     93    echo_ch(**(Parse("echo_ch test2/new").parsed)) 
  • SHX/trunk/SeismicHandler/commands/reads.py

    r294 r442  
    1717 
    1818from SeismicHandler.basics.command import BaseCommand 
    19 from obspy.core import read 
    2019 
    2120provides = {"reads": "reads"} 
  • SHX/trunk/SeismicHandler/commands/sdef.py

    r296 r442  
    2626    This command deals with the local and/or global symbol set. This is defined 
    2727    a parser level, for doctest is has to done manually. 
    28     >>> from SeismicHandler.modules.parse import symbol 
    29     >>> s = symbol() 
     28    >>> from SeismicHandler.modules.parse import Symbol 
     29    >>> s = Symbol() 
    3030 
    3131    Define a local symbol: 
     
    5151    If we initialize another symbol set, the globally defined symbols should 
    5252    be still there: 
    53     >>> s1 = symbol() 
     53    >>> s1 = Symbol() 
    5454    >>> s1.bar 
    5555    3 
  • SHX/trunk/SeismicHandler/commands/sdel.py

    r296 r442  
    2525    This command deals with the local and/or global symbol set. This is defined 
    2626    a parser level, for doctest is has to done manually. 
    27     >>> from SeismicHandler.modules.parse import symbol 
    28     >>> s = symbol() 
     27    >>> from SeismicHandler.modules.parse import Symbol 
     28    >>> s = Symbol() 
    2929    >>> s.foo = 1 
    3030    >>> s.setGlobal("bar", 2) 
     
    3636    Traceback (most recent call last): 
    3737    ... 
    38     Exception: Symbol FOO not found! 
     38    ShxError: Symbol 'FOO' not found! 
    3939 
    4040    Explicit deleting of a global symbol needs a qualifier. If no local symbol 
     
    4747    If we initialize another symbol set, the globally defined symbol should 
    4848    be gone: 
    49     >>> s1 = symbol() 
     49    >>> s1 = Symbol() 
    5050    >>> s1.bar #doctest: +ELLIPSIS 
    5151    Traceback (most recent call last): 
    5252    ... 
    53     Exception: Symbol BAR not found! 
     53    ShxError: Symbol 'BAR' not found! 
    5454 
    5555 
  • SHX/trunk/SeismicHandler/modules/parse.py

    r441 r442  
    246246            self.parameters = parameters 
    247247 
     248        self.searchpath = ["."] 
    248249        if "searchpath" in kwargs: 
    249             self.searchpath = kwargs["searchpath"] 
     250            self.searchpath += kwargs["searchpath"] 
    250251        else: 
    251             # XXX use default search path from configuration 
    252             self.searchpath = [""] 
     252            # use search path from configuration 
     253            self.searchpath += Settings.config.paths.scripts 
    253254 
    254255        try: 
Note: See TracChangeset for help on using the changeset viewer.