From 8215c6212fd0dfa3ea7ea7a51336c1a601e5407d 2008-07-04 22:36:14 From: vds Date: 2008-07-04 22:36:14 Subject: [PATCH] Make sure that if synchronization is with .pyc file the corresponding .py file is used for the synchronization. --- 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)