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.


    [Bug] Pythonista on iPhone ctypes not loading properly

    Pythonista
    ctypes iphone bug
    3
    4
    3873
    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.
    • blmacbeth
      blmacbeth last edited by

      When initially opening Pythonista on my iPhone 6 and try to load ctypes from a script (or in the console) I get a NotImplementedError. I solve this by opening a file in the ObjC examples folder. Just wanted to let y'all know and see if it is happening to anyone else.

      B

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

        this is just import ctypes? I am skeptical... do you have a ctypes.py where it doesn't belong?

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

          Output from the console:

          >>> import ctypes
          Traceback (most recent call last):
            File "<string>", line 1, in <module>
            File "/private/var/mobile/Containers/Shared/AppGroup/FF0B1A40-8BD7-4671-9654-179C13AC560F/Documents/temp/ctypes.py", line 4, in <module>
              from ctypes import c_void_p, c_char_p, c_double, c_float, cdll, util
          ImportError: cannot import name c_void_p
          

          This is right after restarting Pythonista. I can import _ctypes however. This does let me import ctypes.

          ctypes is in Standard Library/ctypes

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

            It looks like you have a script of your own called ctypes.py in a "temp" folder. Naming your scripts like built-in modules is never a good idea, try renaming it to something like ctypes_tests.py (and restart Pythonista if that doesn't help right away).

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