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.
Changes takes no effect in runtime.
-
Hi
I am using Pythonista for iOS and I am new in the Python language. I wrote some scripts with "ui" and some with "scene" and I tested the compile modules (compile, compileall, py_compile). After that, changes in scripts did not effect in runtime. For example: I have a script "abc.py". And I compiled this script and I get an "abc.pyc". So every change in the "abc.py" did not effect in runtime. So I delete the "abc.pyc" but I have the same problem. Actually I have nor ".pyc" files but nothing happens.
The exact problem is that I have a Python Script with an UI. If I press a button I start another Script with a scene module. If I change something in the script with the scene module I see no effect while running the App. Meanwhile I delete the complete content of my draw procedure but nothing happens.
Can anybody help me?
Thanks Jens
-
import abc ; reload(abc)
-
Thats it. Thank you.
-
-
By the way, you shouldn't name any real module
abc
, because there is also a standard Python module namedabc
, which can be used to create abstract base classes (or ABCs). By writing your own module namedabc
, you make the standardabc
module very hard to load, and anything that usesimport abc
will import your module instead of the standard one.I understand that your file probably isn't called
abc
, but naming conflicts can still be an issue. In general when you write a module it's a good idea to check if another module with the same name exists, simply by runningimport thing
in the Python prompt. To find out where that module is located, seething.__file__
.