Home

What Is BlackBerry-Py?

This project is focused on building up an environment to let anyone write Python apps for the PlayBook and BB10 devices. As of PlayBook OS 2.0, a full Python 3.2 interpreter is included in the system, and is currently accessible to developers. We're building a community framework on top of this runtime to allow the development of complete, "native" PlayBook and BB10 applications using Python! As of summer 2012, we have a fairly full port of PySide ready and we have plans beyond that, including support for Cascades on BB10.

BlackBerry-Py uses an MIT License for code that's part of the project itself, while the binary distribution incorporates third-party packages (Qt and PySide) under their own LGPL licenses.

Note

The wiki pages have not been updated since the creation of the BlackBerry-Tart package, which is a much lighter-weight alternative, without the use of PySide. There is no documentation yet, but there are several early samples in the repository, and the default branch is almost entirely just the Tart stuff at this point. More to come.... as usual....

Getting Started

  1. Start either by building PySide, or download our pre-built PySide package.
  2. Install either the BlackBerry AIR SDK or BlackBerry Native SDK for PlayBook. Each of these has the required blackberry-pythonpackager tool, as well as the signing and deploy tools.
  3. Write an app! You can start by building HelloWorld.

Optionally, you may choose/need to start with item 0. "Learn Python", in which case some of these links may be helpful to you. Note that Python is one of the easiest modern programming languages to learn, so don't let a lack of experience with it stop you.

Documentation

Our docs are still being written (okay, we admit we haven't started, beyond these wiki pages).

Updates to the binary distribution are described in the Change History.

Sample Apps

These sample apps are complete, self-contained applications that demonstrate how to access various features and how to structure the code to solve certain types of problems.

QML LiveView
This is our first sample, and as the framework itself is still under initial development it may not reflect any sort of "best practice". It does work though, and it's actually very useful. Download the binary just to assist you with your QML coding!
BB-Py Twitter
This is a sample twitter client that demonstrates the ease of developing a complete app using BB-Py. In its current form, the sample is quite rudimentary, but all of the building blocks are there. Hopefully, everyone can contribute and make it better.
KeyboardSample
This is a small sample showing how to cleanly handle the virtual keyboard by adjusting your layout based on the size of the keyboard area and whether or not it's currently visible.
TextEditorSample
This is another in our line of useful samples. A working text editor, with a file selection dialog supporting directory traversal, an editor engine in Python demonstrating Signals, Slots, and Properties, and numerous QML capabilities including the use of Components and installed modules from the BlackBerryPy imports folder.

Contact us:

  • on freenode.net in the IRC channel #bbx-python
  • on Twitter @BBPyProject
  • email at blackberry-py "at" microcode.ca
  • suggestions for other places? an early post in comp.lang.python (the python mailing list) deafened us with the lack of enthusiasm, but if you missed that one and think there's some interest there, let us know

Updated

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.