Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
decibell
Posts: 73
Registered: ‎11-16-2010
My Device: Playbook
Accepted Solution

Python + Adobe AIR?

Has anyone managed to use python with adobe air? I know it can be done with a local server, but I dunno if this is supported on the PlayBook...

----------------------------
Let's turn things up...
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Python + Adobe AIR?

The PlayBook won't have any Python accessible to us until at least the Native SDK is available, and not to AIR until they allow us to call our own native code as extensions from AS3.

 

Note that Python is used in the PlayBook already, but it's not available to our own code in any way.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
decibell
Posts: 73
Registered: ‎11-16-2010
My Device: Playbook

Re: Python + Adobe AIR?

yeah that's what I noticed, just wasn't sure if it was allowed with AIR, but okay, I'll wait out for now, thanks!
----------------------------
Let's turn things up...
Developer
tags07
Posts: 386
Registered: ‎12-12-2010
My Device: BB Style

Re: Python + Adobe AIR?

I saw a python interactive mode app in the app World..not sure how good it is.. 

Developer
decibell
Posts: 73
Registered: ‎11-16-2010
My Device: Playbook

Re: Python + Adobe AIR?

Yeah I saw that too, it's garbage :smileytongue:
----------------------------
Let's turn things up...
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Python + Adobe AIR?

@tags07, that app is a fake.

 

The description says "This is a Python interpreter right on the BlackBerry PlayBook." but the code is not being executed on the PlayBook.  The author has set up a web service on his site, which is processing the requests.

 

An example, when you type "print 5*6" it sends this request:

 

GET /pythoncmd?cmd=print%205%2A6

It's easy to see that it's not the real thing by typing something like "print sys.path" as well, since that dumps a list of things that aren't even on the PlayBook.

 

 

Although there is a Python 2.7 executable installed on the PlayBook, the permissions are set so that we cannot use it.  The author may have been hoping he could figure out how to call the real thing, so he could fulfill the "Improvements will be coming." promise made in the app's description, but it ain't gonna happen...


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
tags07
Posts: 386
Registered: ‎12-12-2010
My Device: BB Style

Re: Python + Adobe AIR?

ya tried that out last night and it failed miserably 

New Member
jefferysharp
Posts: 1
Registered: ‎05-17-2011
My Device: blackberry storm 2
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Python + Adobe AIR?

For that to work, we'd have to have access to a command-line version of Python on QNX (which we don't, yet), and NativeProcess.isSupported would have to return true on the PlayBook, which it doesn't, yet.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Python + Adobe AIR?

For the record, in the very long time that has passed since this thread was last active, we've got the PB OS 2.0 release and now BB10, both of which have an on-device Python 3.2 runtime "available".

That's written with quotation marks because it's unsupported, but it would be possible to access through an ANE at this point on either platform. There are now also apps written using Python and Cascades, as well as PySide, using code from the BBPyProject (http://blackberry-py.microcode.ca/ ).

I haven't heard of anyone trying this through an ANE from AIR yet, but there is code in that repo which would be a useful starting point for anyone who wanted to get that working.

(Oh, and did I say the on-device Python 3.2 is unsupported? Just want to make sure that's clear...)

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!