diff Lib/idlelib/PyShell.py @ 75848:a9be863e5734 2.7

#3573: idle now doesn't hungs if launched as: idle -e <directory> Patch by Guilherme Polo.
author Andrew Svetlov <andrew.svetlov@gmail.com>
date Wed, 21 Mar 2012 13:35:08 +0200
parents 822d7a1f8885
children 4334964993b9
line wrap: on
line diff
--- a/Lib/idlelib/PyShell.py	Tue Mar 20 16:46:57 2012 +0100
+++ b/Lib/idlelib/PyShell.py	Wed Mar 21 13:35:08 2012 +0200
@@ -1412,8 +1412,10 @@
 
     if enable_edit:
         if not (cmd or script):
-            for filename in args:
-                flist.open(filename)
+            for filename in args[:]:
+                if flist.open(filename) is None:
+                    # filename is a directory actually, disconsider it
+                    args.remove(filename)
             if not args:
                 flist.new()
     if enable_shell: