MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / call_editor

Function call_editor

_pydev_bundle/pydev_ipython_console_011.py:56–73  ·  view source on GitHub ↗

Open an editor in PyDev

(filename, line=0, wait=True)

Source from the content-addressed store, hash-verified

54
55def create_editor_hook(pydev_host, pydev_client_port):
56 def call_editor(filename, line=0, wait=True):
57 """Open an editor in PyDev"""
58 if line is None:
59 line = 0
60
61 # Make sure to send an absolution path because unlike most editor hooks
62 # we don't launch a process. This is more like what happens in the zmqshell
63 filename = os.path.abspath(filename)
64
65 # import sys
66 # sys.__stderr__.write('Calling editor at: %s:%s\n' % (pydev_host, pydev_client_port))
67
68 # Tell PyDev to open the editor
69 server = xmlrpclib.Server("http://%s:%s" % (pydev_host, pydev_client_port))
70 server.IPythonEditor(filename, str(line))
71
72 if wait:
73 input("Press Enter when done editing:")
74
75 return call_editor
76

Callers

nothing calls this directly

Calls 2

inputFunction · 0.85
IPythonEditorMethod · 0.80

Tested by

no test coverage detected