Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/env.py

    r1859 r1848  
    1 """This module has various functions for environment specific setings.
    2 """
    3 __all__ = ["is_casapy", "is_ipython", "setup_env", "get_revision",
    4            "is_asap_cli"]
     1__all__ = ["is_casapy", "is_ipython", "setup_env", "get_revision"]
    52
    63import sys
     
    107
    118def is_casapy():
    12     """Are we running inside casapy?"""
    139    try:
    1410        from taskinit import casalog
     
    1814
    1915def is_ipython():
    20     """Are we running inside IPython?"""
    2116    return 'IPython' in sys.modules.keys()
    2217
    23 def is_asap_cli():
    24     """Are we running inside asap ipython (but not casapy)"""
    25     return is_ipython() and not is_casapy()
    26 
    2718def setup_env():
    28     """Set-up environment variables for casa and initialise ~/.asap on first
    29     use.
    30     """
    3119    # Set up CASAPATH and first time use of asap i.e. ~/.asap/*
    3220    plf = None
     
    7159
    7260def get_revision():
    73     """Get the revision of the software. Only useful within casapy."""
    7461    if not is_casapy:
    7562        return ' unknown '
Note: See TracChangeset for help on using the changeset viewer.