How to use itango - 3 common examples

To help you get started, we’ve selected a few itango examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sardana-org / sardana / src / sardana / spock / ipython_00_10 / genutils.py View on Github external
def get_ipython_dir():
    """Find the ipython local directory. Usually is /.ipython"""
    if hasattr(itango, "get_ipython_dir"):
        return itango.get_ipython_dir()

    if hasattr(IPython.iplib, 'get_ipython_dir'):
        # Starting from ipython 0.9 they hadded this method
        return IPython.iplib.get_ipython_dir()

    # Try to find the profile in the current directory and then in the
    # default IPython dir
    #userdir = os.path.realpath(os.path.curdir)
    home_dir = IPython.genutils.get_home_dir()

    if os.name == 'posix':
        ipdir = '.ipython'
    else:
        ipdir = '_ipython'
    ipdir = os.path.join(home_dir, ipdir)
    ipythondir = os.path.abspath(os.environ.get('IPYTHONDIR', ipdir))
github sardana-org / sardana / src / sardana / spock / ipython_00_10 / genutils.py View on Github external
def get_ipython_profiles():
    """Helper function to find all ipython profiles"""
    if hasattr(itango, "get_ipython_profiles"):
        return itango.get_ipython_profiles()

    ret = []
    ipydir = get_ipython_dir()
    if os.path.isdir(ipydir):
        for i in os.listdir(ipydir):
            fullname = os.path.join(ipydir, i)
            if i.startswith("ipy_profile_") and i.endswith(".py"):
                if os.path.isfile(fullname):
                    ret.append(i[len("ipy_profile_"):i.rfind(".")])
    return ret
github sardana-org / sardana / src / sardana / spock / ipython_00_10 / genutils.py View on Github external
def init_spock(ip, macro_server, door):
    init_pre_spock(ip, macro_server, door)
    itango.init_ipython(ip)
    init_post_spock(ip)

itango

An interactive Tango client

LGPL-3.0
Latest version published 3 months ago

Package Health Score

57 / 100
Full package analysis