Beispiel #1
0
def init():
    global inited
    if inited:
        return
    inited = True  # Only try once, no matter what happens.
    # Add the parent path of this file to sys.path
    import os
    import sys
    theDir = os.path.abspath(
        os.path.join(os.path.dirname(pymacsFile), '..', '..'))
    if theDir not in sys.path:
        print('leoPymacs:adding', theDir, 'to sys.path')
        sys.path.append(theDir)
    # Create the dummy app
    try:
        from leo.core import runLeo as leo
    except ImportError:
        print('leoPymacs.init: can not import runLeo')
        print('leoPymacs.init: sys.path:')
        for z in sys.path:
            print(z)
    leo.run(pymacs=True)
    try:
        from leo.core import leoGlobals
    except ImportError:
        print('leoPymacs.init: can not import leoGlobals')
    global g
    g = leoGlobals
    # print('leoPymacs:init:g',g)
    if 1:  # These traces show up in the pymacs buffer.
        g.trace('app', g.app)
        g.trace('gui', g.app.gui)
Beispiel #2
0
def init():
    global inited
    if inited:
        return
    else:
        inited = True # Only try once, no matter what happens.
    # Add the parent path of this file to sys.path
    import os
    import sys
    theDir = os.path.abspath(os.path.join(os.path.dirname(pymacsFile), '..', '..'))
    if theDir not in sys.path:
        print('leoPymacs:adding', theDir, 'to sys.path')
        sys.path.append(theDir)
    # Create the dummy app
    try:
        import leo.core.runLeo as leo
    except ImportError:
        print('leoPymacs.init: can not import runLeo')
        print('leoPymacs.init: sys.path:')
        for z in sys.path: print(z)
    leo.run(pymacs=True)
    try:
        import leo.core.leoGlobals as leoGlobals
    except ImportError:
        print('leoPymacs.init: can not import leoGlobals')
    global g; g = leoGlobals
    # print('leoPymacs:init:g',g)
    if 1: # These traces show up in the pymacs buffer.
        g.trace('app', g.app)
        g.trace('gui', g.app.gui)
Beispiel #3
0
def run(*args,**keys):
    import pdb ; pdb = pdb.set_trace
    import leo.core.runLeo as runLeo
    runLeo.run(*args,**keys)
Beispiel #4
0
def run(*args, **keys):  # pragma: no cover
    # import pdb; pdb = pdb.set_trace  # type: ignore[assignment]
    import leo.core.runLeo as runLeo
    runLeo.run(*args, **keys)
Beispiel #5
0
def run(*args, **keys):
    import pdb
    pdb = pdb.set_trace
    import leo.core.runLeo as runLeo
    runLeo.run(*args, **keys)
Beispiel #6
0
def run(*args, **keys):
    import pdb
    pdb = pdb.set_trace  # type: ignore[assignment]
    import leo.core.runLeo as runLeo
    runLeo.run(*args, **keys)