symbian-qemu-0.9.1-12/python-2.6.1/Mac/IDLE/idlemain.py
changeset 1 2fb8b9db1c86
equal deleted inserted replaced
0:ffa851df0825 1:2fb8b9db1c86
       
     1 """
       
     2 Bootstrap script for IDLE as an application bundle.
       
     3 """
       
     4 import sys, os
       
     5 
       
     6 from idlelib.PyShell import main
       
     7 
       
     8 # Change the current directory the user's home directory, that way we'll get
       
     9 # a more useful default location in the open/save dialogs.
       
    10 os.chdir(os.path.expanduser('~/Documents'))
       
    11 
       
    12 
       
    13 # Make sure sys.executable points to the python interpreter inside the
       
    14 # framework, instead of at the helper executable inside the application
       
    15 # bundle (the latter works, but doesn't allow access to the window server)
       
    16 if sys.executable.endswith('-32'):
       
    17     sys.executable = os.path.join(sys.prefix, 'bin', 'python-32')
       
    18 else:
       
    19     sys.executable = os.path.join(sys.prefix, 'bin', 'python')
       
    20 
       
    21 # Look for the -psn argument that the launcher adds and remove it, it will
       
    22 # only confuse the IDLE startup code.
       
    23 for idx, value in enumerate(sys.argv):
       
    24     if value.startswith('-psn_'):
       
    25         del sys.argv[idx]
       
    26         break
       
    27 
       
    28 #argvemulator.ArgvCollector().mainloop()
       
    29 if __name__ == '__main__':
       
    30     main()