Created
April 23, 2016 18:22
-
-
Save akshayaurora/e1a637a67a3ccd6cbd6164ce67861c53 to your computer and use it in GitHub Desktop.
This file contains 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
With the following output on console:: | |
Hello Raven App | |
ProcessName: sysinfo | |
HostName: qua-nons-macbook-pro.local | |
OS Version: Version 9.2 (Build 13C75) | |
ProcessorCount: 4 | |
DeviceName: iPhone Simulator | |
SystemName: iPhone OS | |
UI Idiom: 0 | |
Orientation: 1 | |
SystemVersion: 9.2 | |
DeviceModel iPhone | |
LocalizedModel: iPhone | |
F377A3B8-45B4-48F9-B4AE-BF3262C9EE6D | |
BatteryState: 0 |
This file contains 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
from kivy.app import App | |
from kivy.factory import Factory | |
from pyobjus import autoclass | |
from pyobjus.dylib_manager import load_framework | |
from plyer.facades import UniqueID | |
#load_framework('/System/Library/Frameworks/UIKit.framework') | |
UIDevice = autoclass('UIDevice') | |
NSProcessInfo = autoclass('NSProcessInfo') | |
processInfo = NSProcessInfo.processInfo() | |
class RavenApp(App): | |
def build(self): | |
return Factory.Button() | |
def on_start(self): | |
print "Hello Raven App" | |
print 'ProcessName: ', processInfo.processName.cString() | |
print 'HostName: ', processInfo.hostName.cString() | |
print 'OS Version: ', processInfo.operatingSystemVersionString.cString() | |
print 'ProcessorCount: ', processInfo.processorCount | |
currentDevice = UIDevice.currentDevice() | |
print 'DeviceName: ', currentDevice.name.cString() | |
print 'SystemName: ', currentDevice.systemName.cString() | |
print 'UI Idiom: ', currentDevice.userInterfaceIdiom | |
print 'Orientation: ', currentDevice.orientation | |
print 'SystemVersion: ', currentDevice.systemVersion.cString() | |
print 'DeviceModel ', currentDevice.model.cString() | |
print 'LocalizedModel: ', currentDevice.localizedModel.cString() | |
print currentDevice.identifierForVendor.UUIDString().cString() | |
print 'BatteryState:', currentDevice.batteryState | |
if __name__ == '__main__': | |
RavenApp().run() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment