Created
July 27, 2012 20:40
-
-
Save beelsebob/3190377 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import CoreLocation | |
| # print dir(CoreLocation) | |
| class ShowLocation(object): | |
| """docstring for ShowLocation""" | |
| def locationManager_didUpdateToLocation_fromLocation_(self, manager, newLocation, oldLocation): | |
| """docstring for didUpdateToLocation:fromLocation:""" | |
| print "moo" #newLocation, oldLocation | |
| def timerFire_(self, timer) | |
| pass | |
| locationShower = ShowLocation() | |
| loc = CoreLocation.CLLocationManager.alloc().init() | |
| loc.setDelegate_(locationShower) | |
| runLoop = Cocoa.NSRunLoop.currentRunLoop() # Guessing at Cocoa here | |
| timer = Cocoa.NSTimer.scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_(24*60*60, locationShower, timerFire_, locationShower, true) | |
| while true | |
| runLoop.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment