omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Device serial Name

    Pythonista
    2
    3
    2198
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • filippocld223
      filippocld223 last edited by

      Is there a way to get the device serial number from Pythonista?

      1 Reply Last reply Reply Quote 0
      • ccc
        ccc last edited by

        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

        1 Reply Last reply Reply Quote 0
        • filippocld223
          filippocld223 last edited by

          Thanks.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors