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
-
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
-
this is just import ctypes? I am skeptical... do you have a ctypes.py where it doesn't belong?
-
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 importctypes
.ctypes
is inStandard Library/ctypes
-
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 likectypes_tests.py
(and restart Pythonista if that doesn't help right away).