]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
- Remove -psn-xxxx argument added by the Finder.
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 2 Aug 2002 12:56:21 +0000 (12:56 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 2 Aug 2002 12:56:21 +0000 (12:56 +0000)
- "Open Document" appleevent is "odoc", not "open".

Mac/Lib/argvemulator.py

index 032a167cebfbc885937daeef3f7830036917f5e6..2df597a9de3ac2ed7409073c502d04f65313da89 100644 (file)
@@ -17,8 +17,11 @@ class ArgvCollector:
        def __init__(self):
                self.quitting = 0
                self.ae_handlers = {}
+               # Remove the funny -psn_xxx_xxx argument
+               if sys.argv[0][:4] == '-psn':
+                       del sys.argv[0]
                self.installaehandler('aevt', 'oapp', self.open_app)
-               self.installaehandler('aevt', 'open', self.open_file)
+               self.installaehandler('aevt', 'odoc', self.open_file)
        
        def installaehandler(self, classe, type, callback):
                AE.AEInstallEventHandler(classe, type, self.callback_wrapper)