Changeset 1858 for trunk/python/env.py
- Timestamp:
- 08/05/10 11:46:40 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/env.py
r1848 r1858 1 """This module has various functions for environment specific setings. 2 """ 1 3 __all__ = ["is_casapy", "is_ipython", "setup_env", "get_revision"] 2 4 … … 7 9 8 10 def is_casapy(): 11 """Are we running inside casapy?""" 9 12 try: 10 13 from taskinit import casalog … … 14 17 15 18 def is_ipython(): 19 """Are we running inside IPython?""" 16 20 return 'IPython' in sys.modules.keys() 17 21 18 22 def setup_env(): 23 """Set-up environment variables for casa and initialise ~/.asap on first 24 use. 25 """ 19 26 # Set up CASAPATH and first time use of asap i.e. ~/.asap/* 20 27 plf = None … … 59 66 60 67 def get_revision(): 68 """Get the revision of the software. Only useful within casapy.""" 61 69 if not is_casapy: 62 70 return ' unknown '
Note: See TracChangeset
for help on using the changeset viewer.