--- /home/romeo/Desktop/idlelib/PyShell.py 2009-01-17 15:14:23.000000000 -0500 +++ /usr/lib/python3.0/idlelib/PyShell.py 2009-01-17 22:50:41.000000000 -0500 @@ -1378,6 +1378,26 @@ if enable_edit: if not (cmd or script): for filename in args: + # If a file does not exist, create it: + # Test for file existence: + r_exists = False + try: + r_file = open(filename) + except IOError: + r_exists = False + else: + r_exists = True + r_file.close() + # If the file doesn't exist, create it: + if not r_exists: + try: + r_file = open(filename, "w") + r_file.close() + except IOError: + # Can't create the file. + # I expect that the next thing that you do is try + # to open the file, so I'll let you deal with it. + pass flist.open(filename) if not args: flist.new()