Project/Project.py

changeset 1157
31644008f9b2
parent 1142
01ae8e2946d3
child 1158
33dce2093b6f
--- a/Project/Project.py	Fri Jul 01 19:46:37 2011 +0200
+++ b/Project/Project.py	Sat Jul 02 14:22:58 2011 +0200
@@ -1721,11 +1721,15 @@
         """
         try:
             os.remove(os.path.join(self.ppath, fn))
-            dummy, ext = os.path.splitext(fn)
+            path, ext = os.path.splitext(fn)
             if ext == '.ui':
                 fn2 = os.path.join(self.ppath, '{0}.h'.format(fn))
                 if os.path.isfile(fn2):
                     os.remove(fn2)
+            for ext in ['.pyc', '.pyo']:
+                fn2 = path + ext
+                if os.path.isfile(fn2):
+                    os.remove(fn2)
         except EnvironmentError:
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Delete file"),

eric ide

mercurial