Posted
over 8 years
ago
by
Alexander Taylor
I’ve just released Pyonic interpreter 1.2. As usual, you can get it
from Google Play, now for Python 2.7
or Python 3.6.
The APKs can also de bownloaded directly from Github
(where the source code is also available).
This is the first release to
... [More]
target Python 3.6 on Android (not just
Python 3.5), which is made possible by recent additions to
python-for-android. I expect to do a separate python-for-android
release to announce this shortly.
The main change to the app this release is support for the input
and (in Python 2) raw_input functions. These would previously
crash as the interpreter isn’t really being run in a shell, so the way
they try to take input doesn’t work. They are now overridden with new
replacements, which should hopefully behave roughly the same way as the
originals are supposed to, but via a more convenient popup gui for the
text to be entered.
I’m still working on file editing and other Python management
functions, but there didn’t seem to be any reason to delay a release
since according to the Google Play reviews people are trying and
failing to use the input functions. Continue reading → [Less]
|
Posted
over 8 years
ago
by
Alexander Taylor
I’ve just released Pyonic interpreter 1.1. As usual, you can get it
from Google Play for Python 2.7
or Python 3.5,
or download the APKs directly from Github
(where the source code is also available).
The major feature in this release is
... [More]
autocompletion support via the
excellent jedi library, as
is used by many editors and IDEs. Pyonic now automatically gives
a list of autocompletion options as you write Python code, any of
which can be selected by tapping it. There’s also a new help button,
which when pressed shows the call signature and docstring of the
Python object reference currently under the cursor.
As a further bonus, I’ve reduced the size of the Python 3 APK by a
further ~25%, it’s now around 11MB. This is probably still a little
larger than it needs to be, but is much better than the massive 19MB
version that I first published! I’ll continue to try to improve this
with tweaks in python-for-android’s Python 3 build process.
For the next release, I intend to go back to improving Pyonic’s
process handling, and from there to add support for pip installation
of new modules and file editing. The latter of these will also benefit
from the new autocompletion integration. [Less]
|
Posted
over 8 years
ago
by
Alexander Taylor
I’ve just released Pyonic interpreter 1.1. As usual, you can get it
from Google Play for Python 2.7
or Python 3.5,
or download the APKs directly from Github
(where the source code is also available).
The major feature in this release is
... [More]
autocompletion support via the
excellent jedi library, as
is used by many editors and IDEs. Pyonic now automatically gives
a list of autocompletion options as you write Python code, any of
which can be selected by tapping it. There’s also a new help button,
which when pressed shows the call signature and docstring of the
Python object reference currently under the cursor.
As a further bonus, I’ve reduced the size of the Python 3 APK by a
further ~25%, it’s now around 11MB. This is probably still a little
larger than it needs to be, but is much better than the massive 19MB
version that I first published! I’ll continue to try to improve this
with tweaks in python-for-android’s Python 3 build process.
For the next release, I intend to go back to improving Pyonic’s
process handling, and from there to add support for pip installation
of new modules and file editing. The latter of these will also benefit
from the new autocompletion integration. Continue reading → [Less]
|
Posted
over 8 years
ago
by
Alexander Taylor
I’ve just released Pyonic interpreter 1.0. You can get it from Google
Play for Python 2.7
or Python 3.5,
or download the APKs directly from Github
(update: changed to v1.0.1 following a small bugfix).
The primary change in this release is that both
... [More]
APKs are about 25%
smaller than before, thanks to optimisations in the Python
distributions that I’ve added to python-for-android - in particular,
making sure Python files are shipped as .pyo files (which may also
speed things up a bit) and stripping unneeded symbols from object
files with Python 3. Both of these were things python-for-android has
been missing for a while, so it’s nice to get them working and
immediately see the benefits.
I’ve also been working on some backend improvements in Pyonic and
python-for-android in order to support multiple interpreter processes.
This will be convenient for using pip and running Python code from
files, but isn’t ready yet and so hasn’t made it into this release. Continue reading → [Less]
|
Posted
over 8 years
ago
by
Alexander Taylor
I’ve just released Pyonic interpreter 1.0. You can get it from Google
Play for Python 2.7
or Python 3.5,
or download the APKs directly from Github
(update: changed to v1.0.1 following a small bugfix).
The primary change in this release is that both
... [More]
APKs are about 25%
smaller than before, thanks to optimisations in the Python
distributions that I’ve added to python-for-android - in particular,
making sure Python files are shipped as .pyo files (which may also
speed things up a bit) and stripping unneeded symbols from object
files with Python 3. Both of these were things python-for-android has
been missing for a while, so it’s nice to get them working and
immediately see the benefits.
I’ve also been working on some backend improvements in Pyonic and
python-for-android in order to support multiple interpreter processes.
This will be convenient for using pip and running Python code from
files, but isn’t ready yet and so hasn’t made it into this release. [Less]
|
Posted
almost 9 years
ago
by
Alexander Taylor
Pyonic interpreter 0.7 has just been released. There are now two
versions on Google Play, one for Python 2.7
and one for Python 3.5. The
APKs are also available directly from Github. Other
features in this release include a new settings screen and
... [More]
improved
gui arrangement.
The app is written in Python using Kivy, and uses exactly the same
code under both Python versions. This code is open source and
available online on Github.
This release includes most of the short term improvements I had
planned, since supporting Python 3 didn’t raise any major issues. I
expect that development will now focus on adding a few more usability
tweaks, then working with the Python packaging to add features like
pip installs for new modules, code editing (rather than just the
interpreter interface), and support for GUI creation via Kivy. [Less]
|
Posted
almost 9 years
ago
by
Alexander Taylor
Pyonic interpreter 0.7 has just been released. There are now two
versions on Google Play, one for Python 2.7
and one for Python 3.5. The
APKs are also available directly from Github. Other
features in this release include a new settings screen and
... [More]
improved
gui arrangement.
The app is written in Python using Kivy, and uses exactly the same
code under both Python versions. This code is open source and
available online on Github.
This release includes most of the short term improvements I had
planned, since supporting Python 3 didn’t raise any major issues. I
expect that development will now focus on adding a few more usability
tweaks, then working with the Python packaging to add features like
pip installs for new modules, code editing (rather than just the
interpreter interface), and support for GUI creation via Kivy. Continue reading → [Less]
|
Posted
almost 9 years
ago
by
Alexander Taylor
I’ve just released a new app, Pyonic Python 2 interpreter.
Pyonic interpreter is a Python interpreter app for Android, providing
a convenient interface adapted to mobile devices. The app itself is
written entirely in Python using Kivy.
I put this
... [More]
together because I’ve always thought it would be nice to
have a Python interpreter app that is itself written in Python, and in
principle Kivy and python-for-android provide all
the necessary components. In practice this worked even better than I
expected, Kivy handled almost everything perfectly - I actually
underestimated its maturity here! As part of the project, I’ve tried
to round a number of corners that Kivy apps sometimes can to have, so
that the interpreter (hopefully) behaves nicely in all
situations. Within the interpreter, all of the standard library is
available, and it’s possible to interrupt execution (equivalent to the
normal ctrl+c behaviour) or to restart the interpreter process. No
external modules are included yet except those necessary for the app
to run, but I’ll probably include some major ones like numpy in a
future release, and in the long term the aim is to support pip
installs of new modules.
This has also been a great stimulus for working on python-for-android;
I’ve fixed a number of bugs, added several new features, and improved
documentation in several places, just thanks to needing these things
in a real app.
On a technical level, Pyonic interpreter runs under Python 2,
consisting of the app itself and a background Service running a second
instance of the interpreter. I’ll be working on Python 3 support in
the near future, in fact I originally wrote the app using Python 3 but
switched to Python 2 partly due to incompatibilities in Kivy’s osc
library (which should be easily fixed or avoided by just using a
better communication library) and partly the more well-tested nature
of python-for-android’s Python 2 build.
The interpreter works by passing submitted Python code to the
background Python process where it is parsed as ast and compiled in
‘exec’ or ‘single’ mode as appropriate to replicate the output
printing behaviour of the normal Python interpreter. Doing things this
way is a little awkward and feels like reinventing the wheel, although
I’m not sure how to better achieve the same thing. An alternative
might be to just call the python binary in a subprocess and manipulate
its stdin/stdout - I’ll be looking into this option, but it doesn’t
eliminate the need for message passing and may need some small changes
in python-for-android, assuming also that android doesn’t impose any
important limits on subprocessing.
In the short term future, I expect to work first on releasing an
improved version that adds a number of useful settings options (sneak
peek in the image below), followed by working on a Python 3 version,
and then to investigate some of these technical questions. I’d like to
look into iOS support, as everything should work almost the same way
there, but I don’t have the hardware or developer mempership for iOS
development; if anyone would like to try it, let me know. Longer term,
Pyonic interpreter is an experimental step towards creating a larger
suite of mobile Python tools, in tandem with using this experience to
improve python-for-android. There are many features to be added
directly to the interpreter, but I’d also like to add surrounding
tools including a full code editor, the ability to use pip to install
other modules locally, and GUI support via additional Kivy activities.
Settings screen in development to appear in the next release.
[Less]
|
Posted
almost 9 years
ago
by
Alexander Taylor
I’ve just released a new app, Pyonic Python 2 interpreter.
Pyonic interpreter is a Python interpreter app for Android, providing
a convenient interface adapted to mobile devices. The app itself is
written entirely in Python using Kivy.
I put this
... [More]
together because I’ve always thought it would be nice to
have a Python interpreter app that is itself written in Python, and in
principle Kivy and python-for-android provide all
the necessary components. In practice this worked even better than I
expected, Kivy handled almost everything perfectly - I actually
underestimated its maturity here! As part of the project, I’ve tried
to round a number of corners that Kivy apps sometimes can to have, so
that the interpreter (hopefully) behaves nicely in all
situations. Within the interpreter, all of the standard library is
available, and it’s possible to interrupt execution (equivalent to the
normal ctrl+c behaviour) or to restart the interpreter process. No
external modules are included yet except those necessary for the app
to run, but I’ll probably include some major ones like numpy in a
future release, and in the long term the aim is to support pip
installs of new modules.
This has also been a great stimulus for working on python-for-android;
I’ve fixed a number of bugs, added several new features, and improved
documentation in several places, just thanks to needing these things
in a real app.
On a technical level, Pyonic interpreter runs under Python 2,
consisting of the app itself and a background Service running a second
instance of the interpreter. I’ll be working on Python 3 support in
the near future, in fact I originally wrote the app using Python 3 but
switched to Python 2 partly due to incompatibilities in Kivy’s osc
library (which should be easily fixed or avoided by just using a
better communication library) and partly the more well-tested nature
of python-for-android’s Python 2 build.
The interpreter works by passing submitted Python code to the
background Python process where it is parsed as ast and compiled in
‘exec’ or ‘single’ mode as appropriate to replicate the output
printing behaviour of the normal Python interpreter. Doing things this
way is a little awkward and feels like reinventing the wheel, although
I’m not sure how to better achieve the same thing. An alternative
might be to just call the python binary in a subprocess and manipulate
its stdin/stdout - I’ll be looking into this option, but it doesn’t
eliminate the need for message passing and may need some small changes
in python-for-android, assuming also that android doesn’t impose any
important limits on subprocessing.
In the short term future, I expect to work first on releasing an
improved version that adds a number of useful settings options (sneak
peek in the image below), followed by working on a Python 3 version,
and then to investigate some of these technical questions. I’d like to
look into iOS support, as everything should work almost the same way
there, but I don’t have the hardware or developer mempership for iOS
development; if anyone would like to try it, let me know. Longer term,
Pyonic interpreter is an experimental step towards creating a larger
suite of mobile Python tools, in tandem with using this experience to
improve python-for-android. There are many features to be added
directly to the interpreter, but I’d also like to add surrounding
tools including a full code editor, the ability to use pip to install
other modules locally, and GUI support via additional Kivy activities.
Settings screen in development to appear in the next release.
Continue reading → [Less]
|
Posted
about 9 years
ago
by
Alexander Taylor
We’ve just officially released python-for-android 0.4, and pushed it
to PyPI for the first time!
python-for-android is a
packaging tool for turning Python scripts and apps into Android
APKs. It was originally created for use with the Kivy graphical
... [More]
framework, but now supports multiple kinds
of Python app including Kivy, PySDL2, a webview interface with Flask
or other webserver backend, plain Python scripts without a GUI, or other
possibilities such as Python builds for use in other applications.
This release is the culmination of all the work over the last year to
replace Kivy’s old Android toolchain with something more flexible and
useful for other projects. Major features added in this time include
the fully Python toolchain itself, support for SDL2 and other
bootstraps, (experimental) python3 support via the CrystaX NDK, multiple architecture support, and many
general improvements to the backend. Many thanks to all the
contributors who have made this possible!
From now on we intend to move to regular versioned releases rather
than the previous rolling master branch. Short term targets for the
next release include bringing the python3 build up to full
functionality and stability, and some argument restructuring to make
command line usage simpler and clearer.
As of this release, you can now install python-for-android with simply:
pip install python-for-android
For full instructions and further information, see the
python-for-android documentation. Continue reading → [Less]
|