diff options
author | Jay Freeman <saurik@saurik.com> | 2008-07-24 00:48:38 +0000 |
---|---|---|
committer | Jay Freeman <saurik@saurik.com> | 2008-07-24 00:48:38 +0000 |
commit | e3d85fd14c2a17788e20c7b0f09519e2bdb25211 (patch) | |
tree | cb792c0eaa95b2a231826f633aaadb390e834069 /data/iphone-python | |
parent | 6bcadf3183c393c7592bda2d71af911d0df1891e (diff) |
Added a suggestion from Peter Iannucci to use sys.argv, and removed Celestial usage (as 2.0 hates it).
git-svn-id: http://svn.telesphoreo.org/trunk@384 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/iphone-python')
-rw-r--r-- | data/iphone-python/HelloPython.app/HelloPython.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/data/iphone-python/HelloPython.app/HelloPython.py b/data/iphone-python/HelloPython.app/HelloPython.py index 5c3ee21d2..82fe5243b 100644 --- a/data/iphone-python/HelloPython.app/HelloPython.py +++ b/data/iphone-python/HelloPython.app/HelloPython.py @@ -4,12 +4,13 @@ # While I managed to get PyObjC working, I didn't actually # know any Python to go with it ;P. - Jay Freeman (saurik) +import sys + import objc from _uicaboodle import UIApplicationMain from objc import YES, NO, NULL from sqlite3 import dbapi2 as sqlite -objc.loadBundle("Celestial", globals(), "/System/Library/Frameworks/Celestial.framework") objc.loadBundle("UIKit", globals(), "/System/Library/Frameworks/UIKit.framework") class PYApplication(UIApplication): @@ -108,13 +109,4 @@ class PYApplication(UIApplication): self.list.setDataSource_(self) self.list.reloadData() - # XXX: this isn't working... it does from Java... - controller = AVController.alloc().init() - wavfile = NSBundle.mainBundle().pathForResource_ofType_("start", "wav") - wavitem = AVItem.alloc().initWithPath_error_(wavfile, NULL) - wavitem.setVolume_(100) - controller.setCurrentItem_(wavitem) - controller.setCurrentTime_(0) - controller.play_(NULL) - -UIApplicationMain(["HelloPython"], PYApplication) +UIApplicationMain(sys.argv, PYApplication) |