mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 01:21:38 -05:00
Fix ein.find_source
This commit is contained in:
parent
81a1b64fb0
commit
105f1af2b5
1 changed files with 6 additions and 4 deletions
10
lisp/ein.py
10
lisp/ein.py
|
@ -41,13 +41,15 @@ except ImportError:
|
|||
|
||||
def find_source(name):
|
||||
"""Given an object as string, `name`, print its place in source code."""
|
||||
# FIXME: use JSON display object instead of stdout
|
||||
ret = _find_edit_target(name, {}, [])
|
||||
if ret:
|
||||
(filename, lineno, use_temp) = ret
|
||||
print filename
|
||||
print lineno
|
||||
else:
|
||||
raise RuntimeError("Source code for {0} cannot be found".format(name))
|
||||
if not use_temp:
|
||||
print filename
|
||||
print lineno
|
||||
return
|
||||
raise RuntimeError("Source code for {0} cannot be found".format(name))
|
||||
|
||||
|
||||
def run_docstring_examples(obj, verbose=True):
|
||||
|
|
Loading…
Add table
Reference in a new issue