Out of curiosity, has anyone here taken any applications developed using wxPython and got them to work on an Android platform? I'm looking to maybe port my cycling database thing to android if it's feasable - I understand there's a python interpreter available for Android, but wxPython? Any plans? Have I missed something obvious?
Out of curiosity, has anyone here taken any applications developed using
wxPython and got them to work on an Android platform?
Well, yes and no. It boiled down to a rewrite of the GUI parts to a
completely different GUI framework, written in a different language.
I'm looking to
maybe port my cycling database thing to android if it's feasable - I
understand there's a python interpreter available for Android, but
wxPython? Any plans? Have I missed something obvious?
Python is part of the so called Android Scripting Environment, which
currently is very weak wrt. GUI composition and use. In essence, there
is a way to run arbitrary Python scripts from a shell and there is a
rudimentary example of embedding a single Python script into a full
blown Android app written in Java.
Years ago, there was a tiny wxPython application which emulated parts of
the API of Python for the Symbian phones, which made it possible to
write simple applications which ran more or less unchanged on phones and
on the desktop. That would my perferred way for writing Python based
Android apps too, but I don't believe this to be possible, because the
ASE isn't mature enough, yet.
IMHO porting wxPython (i.e. wxWidgets) to the Android platform it isn't
feasible.
I would assume that currently the only feasible way to use Python on
smartphones is Symbian or Maemo/Meego.
The GUI toolkit for this is Qt (PySide or PyQt).
I'm successfully doing this on a Nokia N900, the only Maemo phone.
Maemo is fully-featured Linux platform, not only the kernel like
Android. It also allows full root access.
My setup is:
- Wing IDE on PC
- remote control of phone via VNC
- automatically copy files to phone via SSH and start execution
- optional: Python on the phone imports debugger and connects back to
the Wing IDE debugger on the PC
- optional: use PyGTKEditor on the phone to edit and start
To a certain degree, you can write applications that run on the PC and
on the phone.
I've written e.g. my own MP3 player. But as communication with the
environment is done via dbus (e.g. to get notified about volume
changes), the same software will not run unchanged on the PC or
on a Symbian device.
Regards,
Dietmar
···
Am 02.01.2011 12:09, schrieb Wolfgang Strobl:
Years ago, there was a tiny wxPython application which emulated parts of
the API of Python for the Symbian phones, which made it possible to
write simple applications which ran more or less unchanged on phones and
on the desktop. That would my perferred way for writing Python based
Android apps too, but I don't believe this to be possible, because the
ASE isn't mature enough, yet.
I've got a n800, and it's GTK based. Someone got wxGTK working with Maemo at some point. IS QT the best option now?
I wonder what the future of Maemo is now anyway. Of course, one goal of a platform independent toolkit is that it can be ported to new plafforms as they come along, but with closed systems like iOS, and semi-closed systems like Android, that's pretty tough!
I wonder if wxJAVA and Jython have any hope on Android?
-Chris
···
On 1/2/2011 6:19 AM, Dietmar Schwertberger wrote:
I would assume that currently the only feasible way to use Python on
smartphones is Symbian or Maemo/Meego.
The GUI toolkit for this is Qt (PySide or PyQt).
I'm successfully doing this on a Nokia N900, the only Maemo phone.
I've got a n800, and it's GTK based. Someone got wxGTK working with
Maemo at some point. IS QT the best option now?
Yes, PyGTK is still available on the N900. No idea about wxGTK.
Python apps can be written in GTK or Qt. (Actually, as it's a full
Linux with an X server, other ways would be possible.)
As Nokia is pushing Qt, that's probably the better choice now.
If you want to implement desktop widgets for Maemo in Python,
then you probably still have to use GTK.
I wonder what the future of Maemo is now anyway. Of course, one goal of
a platform independent toolkit is that it can be ported to new plafforms
as they come along, but with closed systems like iOS, and semi-closed
systems like Android, that's pretty tough!
Nokias position is "Develop and test with Qt on Maemo and your app
will be ready for Meego."
The UI on an Android device is only accessible via the Android runtime library, which means that it is mostly Java-only. IIUC, currently Python can be used for running a background process, and also in a very limited way with the Android Scripting Environment already mentioned.
I said "mostly" above because it is possible to write C/C++ code using the JNI, similar to how binary extension modules work in Python. And the C/C++ code can access the UI library (or other Java classes) via the JNI as well. Finally, the most recent versions of Android now allow the entire application (or "Activity") to be written with native code and do not require that at least the start up code be Java.
There has been a bit of talk on wx-dev about the possibility of porting wxWidgets to Android using the JNI, but as far as I know nobody has actually done any tests or work on it yet.
···
On 1/1/11 8:06 PM, Carl Brewer wrote:
Out of curiosity, has anyone here taken any applications developed using
wxPython and got them to work on an Android platform? I'm looking to
maybe port my cycling database thing to android if it's feasable - I
understand there's a python interpreter available for Android, but
wxPython? Any plans? Have I missed something obvious?
The UI on an Android device is only accessible via the Android runtime
library, which means that it is mostly Java-only. IIUC, currently Python
can be used for running a background process, and also in a very limited
way with the Android Scripting Environment already mentioned.
I said "mostly" above because it is possible to write C/C++ code using
the JNI, similar to how binary extension modules work in Python. And the
C/C++ code can access the UI library (or other Java classes) via the JNI
as well. Finally, the most recent versions of Android now allow the
entire application (or "Activity") to be written with native code and do
not require that at least the start up code be Java.
There has been a bit of talk on wx-dev about the possibility of porting
wxWidgets to Android using the JNI, but as far as I know nobody has
actually done any tests or work on it yet.
Yes, and there was some discussion on the wx-dev list at about the same time.
···
On 1/5/11 2:23 AM, Carl Brewer wrote:
On 4/01/2011 6:16 AM, Robin Dunn wrote:
The UI on an Android device is only accessible via the Android runtime
library, which means that it is mostly Java-only. IIUC, currently Python
can be used for running a background process, and also in a very limited
way with the Android Scripting Environment already mentioned.
I said "mostly" above because it is possible to write C/C++ code using
the JNI, similar to how binary extension modules work in Python. And the
C/C++ code can access the UI library (or other Java classes) via the JNI
as well. Finally, the most recent versions of Android now allow the
entire application (or "Activity") to be written with native code and do
not require that at least the start up code be Java.
There has been a bit of talk on wx-dev about the possibility of porting
wxWidgets to Android using the JNI, but as far as I know nobody has
actually done any tests or work on it yet.