Ejemplo n.º 1
0
def launch_pydoc_server():
    server = path.join(env["TM_BUNDLE_SUPPORT"], "DocMate/pydoc_server.py")
    python, version = tm_helpers.env_python()
    url, port = pydoc_url()
    if not accessible(url):
        # launch pydoc.
        system('/usr/bin/nohup %s %s %i %i\
                    1>> /tmp/pydoc.log 2>> /tmp/pydoc.log &' \
                    % (python, tm_helpers.sh_escape(server), port, TIMEOUT))
    return url
Ejemplo n.º 2
0
def launch_pydoc_server():
    server = path.join(env["TM_BUNDLE_SUPPORT"], "DocMate/pydoc_server.py")
    python, version = tm_helpers.env_python()
    url, port = pydoc_url()
    if not accessible(url):
        # launch pydoc.
        system('/usr/bin/nohup %s %s %i %i\
                    1>> /tmp/pydoc.log 2>> /tmp/pydoc.log &' \
                    % (python, tm_helpers.sh_escape(server), port, TIMEOUT))
    return url
Ejemplo n.º 3
0
def pydoc_url():
    """ Return a URL to pydoc for the python returned by tm_helpers.env_python(). """
    python, version = tm_helpers.env_python()
    port = _PYDOC_PORT + version
    url = _PYDOC_URL % port
    return url, port
Ejemplo n.º 4
0
def pydoc_url():
    """ Return a URL to pydoc for the python returned by tm_helpers.env_python(). """
    python, version = tm_helpers.env_python()
    port = _PYDOC_PORT + version
    url = _PYDOC_URL % port
    return url, port