Changeset 184
- Timestamp:
- 01/15/2010 01:37:11 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SHX/trunk/src/SeismicHandler/startup.py
r153 r184 5 5 # This file is part of Seismic Handler eXtended (SHX) 6 6 # Full details can be found at project website http://www.seismic-handler.org/ 7 # 7 # 8 8 # SHX is free software; you can redistribute it and/or modify 9 9 # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by … … 23 23 24 24 import os 25 import inspect 25 26 26 27 # first check if pythonpath already covers installation directory … … 28 29 try: 29 30 import SeismicHandler 31 mypath = os.sep.join(os.path.split(inspect.getabsfile(SeismicHandler))[0].split(os.sep)[:-1]) 30 32 del SeismicHandler 31 33 except ImportError: 32 34 import sys 33 sys.path.append(os.sep.join(os.path.split(__file__)[0].split(os.sep)[:-1])) 35 mypath = os.sep.join(os.path.split(os.path.abspath(__file__))[0].split(os.sep)[:-1]) 36 sys.path.append(mypath) 34 37 35 38 # finally import modules and commands for instant usage … … 53 56 logging.info("start-up parameter found") 54 57 from SeismicHandler.config.options import options 55 58 56 59 try: 57 60 Run(options.args[0]) 58 # After running script from command line, update trace information. 61 # After running script from command line, update trace information. 59 62 MessageService.trigger(Message(MessageService.TRACEUPDATE)) 60 63 except IndexError: 61 64 pass 62 65 63 66 if not options["keepcmdline"]: 64 67 Quit() 65 68 66 69 del options 67 70 except KeyError:
Note: See TracChangeset
for help on using the changeset viewer.