[BlackBerry-Python] python on Q10
Peter Hansen
peter at engcorp.com
Sat Apr 6 16:31:17 EDT 2013
On 2013-02-28 18:17, Ryan Wooden wrote:
> There were in fact some changes to the python 3.2 runtime for 10.1. As
> of the current SDK, the python runtime will only look for .pyc files
> when loading modules (to speed up launch times). This _may_ be changed
> back before the 10.1 gold release. To make it act like it does in 10.0,
> you can add `<env var="PYTHON_DEFAULT_IMPORT_ORDER" value="1"/>` to your
> bar-descriptor.xml file.
Has anyone tried this with the Dev Alpha C, which in my case is on
10.1.0.1022?
I've tried the above, as well as PYTHONDEFAULTIMPORTORDER=1 (removed
underscores) and although I can execute "python3.2 somefile.py" I cannot
just run python3.2 and then "import somefile". Results are as follows:
$ python3.2 testit.py
hello, world
$ python3.2
Python 3.2.2 (default, Mar 14 2013, 01:40:45)
[GCC 4.6.3] on qnx6
>>> import testit
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named testit
My code works fine when I build it with all .pyc files so I'm assuming
it's because of this issue.
-Peter
More information about the BlackBerry-Python
mailing list