Changeset 384

Show
Ignore:
Timestamp:
07/24/08 00:48:38 (6 months ago)
Author:
saurik
Message:

Added a suggestion from Peter Iannucci to use sys.argv, and removed Celestial usage (as 2.0 hates it).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/data/iphone-python/HelloPython.app/HelloPython.py

    r173 r384  
    55# know any Python to go with it ;P. - Jay Freeman (saurik) 
    66 
     7import sys 
     8 
    79import objc 
    810from _uicaboodle import UIApplicationMain 
     
    1012from sqlite3 import dbapi2 as sqlite  
    1113 
    12 objc.loadBundle("Celestial", globals(), "/System/Library/Frameworks/Celestial.framework") 
    1314objc.loadBundle("UIKit", globals(), "/System/Library/Frameworks/UIKit.framework") 
    1415 
     
    109110        self.list.reloadData() 
    110111 
    111         # XXX: this isn't working... it does from Java... 
    112         controller = AVController.alloc().init() 
    113         wavfile = NSBundle.mainBundle().pathForResource_ofType_("start", "wav") 
    114         wavitem = AVItem.alloc().initWithPath_error_(wavfile, NULL) 
    115         wavitem.setVolume_(100) 
    116         controller.setCurrentItem_(wavitem) 
    117         controller.setCurrentTime_(0) 
    118         controller.play_(NULL) 
    119  
    120 UIApplicationMain(["HelloPython"], PYApplication) 
     112UIApplicationMain(sys.argv, PYApplication)