Clone wiki

BBPython / FAQ

  • What python version is it?

The version is 3.2.2 so every documentation you use should use that version.

  • Can i use scripts of version 2.7?

As the interpreter version is 3.2, you would need to convert your script. You can do that automatically, with tools like 2To3 or manually with some syntax help like from __future__ import More information on Porting from 2 to 3 here

  • Will you integrate the module sqlite3?

It's already integrated. Warning: There's a bug on the 10.3 version of the OS, it will fail to load sqlite3. We are working on it.

  • Where can I get documentation about your python module (information about the functions) ?

Remember that the app contains the documentation for offline viewing as well as some examples. Just hit the left button on the bottom to change to the documentation view. You can go back and forth on it. It also contains the link to open the online version too. Or you can see it at http://docs.python.org

  • Is it possible to import external python libraries ?

Of course ! You can also build your own c compiled modules or use ctypes. Video (Spanish) : http://j.mp/BBCPythonCompile

More documentation on blackberry-py project https://bitbucket.org/microcode/blackberry-py/wiki/Documentation%20Overview

  • How can i load a module?

Just put the module folder in the same folder than the script that uses it. When you load the script, the path is set to that script, and you will be able to import the module. Notice that each time you reset the interpreter the path will be cleared.

  • How can we customise the console colors (background and foreground text) ?

You can output pure html on the console, you can style it whatever you want using html markup.

  • Where are the .PYC files?

.pyc are cache files for bytecode. Due to security restrictions on the device, some folders are read-only. To allow you to use those modules in read only mode, the app is forced to not generate the cache files. The interpreter will work as expected, just that the pyc are not stored on the filesystem.

  • How do i avoid to run the script as soon as it's loaded?

In the settings there's an "Run on load" option that disabling it, if you disable it, the script will load but won't run until you press the "Run" button.

  • How can i make a GUI?

We are working really hard to make this possible, as it means a huge amount of work. There is already some work made by the BBX-python project that makes it possible to run PyQt (4.X) on the device, but it still needs more work to make it available on the interpreter. If you want to help out with this problem feel free to contact us or help us through funding.*

If you like this software, please help us improve it! Share the love with other people! Visit us at

http://www.patreon.com/MoongateIS

http://www.moongate.com.ar/p/funding.html

And thanks for using this humble app.

Updated