filippocld223
May 17, 2014 - 20:08
Is there a way to get the device serial number from Pythonista?
Is there a way to get the device serial number from Pythonista?
This approach used to work until Apple tightened up file system security around iOS 7.
Unfortunately it does not work any more.
import commands, os, subprocess
the_command = '/usr/sbin/system_profiler SPHardwareDataType'
print(commands.getstatusoutput(the_command))
print(os.system(the_command))
print(subprocess.call(the_command.split()))
You might look at uuid and see if that is good enough for your purposes: https://docs.python.org/2/library/uuid.html
Thanks.