diff --git a/IPython/Extensions/ipy_synchronize_with.py b/IPython/Extensions/ipy_synchronize_with.py index 93d4d5f..0623072 100644 --- a/IPython/Extensions/ipy_synchronize_with.py +++ b/IPython/Extensions/ipy_synchronize_with.py @@ -14,6 +14,11 @@ def setHook(synchronize_with_editor): def findFilename(filename): + filename = os.path.splitext(filename) + if filename[1] == ".pyc": + filename = (filename[0], ".py") + filename = "".join(filename) + if not os.path.isabs(filename): filename = os.path.join(os.getcwd(), filename)