[BlackBerry-Python] python on Q10

Tarek Galal tare2.galal at gmail.com
Tue Feb 26 10:26:43 EST 2013


It's not really tart related, but rather related to the python build that
ships on Q10. When I saw that it's not finding the modules that I'm trying
to import, I decided to try from python shell. Even if I explicitly set the
sys.path, it still does not find my module. So I ran python shell again
with -vv to see where it looks for the module. On import I found that it
only looks for pyc, pyo, and .so files, then outputs "No module named
blabla" error. In other words, they have disabled running python scripts
from source, so they need to be compiled.
I haven't touched that part you are referencing, and it works flawlessly on
Z10, dev alpha and simulator, but not on Q10 (neither simulator nor device)
for the reason I mentioned. Once I compiled all my python files and
deployed to Q10 simulator, worked.

On Tue, Feb 26, 2013 at 5:12 PM, Peter Hansen <peter at engcorp.com> wrote:

> On 2013-02-26 10:07, Peter Hansen wrote:
>
>> You're using something based on the trunk tart.cpp, with modifications,
>> right? Is the PyRun_SimpleFileExFlags() call and surrounding stuff still
>> the same as what I'm using?
>>
>
> For reference, the relevant code is currently at http://hg.microcode.ca/**
> blackberry-py/src/**0adbb0353ba558012594f53044e7c8**
> 09d9151617/TartStart/src/tart.**cpp?at=default#cl-42<http://hg.microcode.ca/blackberry-py/src/0adbb0353ba558012594f53044e7c809d9151617/TartStart/src/tart.cpp?at=default#cl-42>
>
> There may be something we can improve there to provide more useful info in
> case of a failure, but note my comment referring to
> http://docs.python.org/3.2/c-**api/veryhigh.html#PyRun_**SimpleStringFlags<http://docs.python.org/3.2/c-api/veryhigh.html#PyRun_SimpleStringFlags>where it says "If there was an error, there is no way to get the exception
> information."  (How very annoying.)
>
>
> -Peter
> ______________________________**_________________
> BlackBerry-Python mailing list
> BlackBerry-Python at engcorp.com
> http://www.engcorp.com/**mailman/listinfo/blackberry-**python<http://www.engcorp.com/mailman/listinfo/blackberry-python>
>



-- 
Regards,
Tarek Galal
http://jadb.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.engcorp.com/pipermail/blackberry-python/attachments/20130226/3335e0b2/attachment.html>


More information about the BlackBerry-Python mailing list