<p dir="ltr">How about python-java bridge, like Rubicon or pyjnius?</p>
<p dir="ltr">You get best of both worlds -- a good language and a mature runtime.</p>
<div class="gmail_quote">On 17 May 2016 18:05, "David Boddie" <<a href="mailto:david@boddie.org.uk">david@boddie.org.uk</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In a belated attempt to jump on the Android bandwagon I started to look<br>
into learning Java and the Android APIs. I realised very quickly that I<br>
couldn't face writing a lot of code in that language. Looking around for<br>
other languages running on the Dalvik VM, I found a few that might be nicer<br>
than Java, but I wasn't so sure that I wanted to write in any of those,<br>
either.<br>
<br>
In the end, I decided to try an experiment to see how much I could learn<br>
about Dalvik and Java by creating tools to handle some of the file formats<br>
used in Android packaging, and by trying to implement a compiler for a subset<br>
of Python.<br>
<br>
The result can be found in this repository:<br>
<br>
<a href="https://bitbucket.org/dboddie/duck" rel="noreferrer" target="_blank">https://bitbucket.org/dboddie/duck</a><br>
<br>
It should be noted that the source language isn't really Python. The parser<br>
from the standard library is used to parse it, but the semantics of the<br>
generated code are different to those of Python. That's why I gave the<br>
language a different name.<br>
<br>
How is this relevant to a mailing list about Python on mobile platforms?<br>
<br>
Firstly, the language may be close enough to Python for people to find it<br>
more familiar than Java, even if there are places where the differences may<br>
trip them up. Writing code to fit into a framework designed for a statically<br>
typed language requires a slightly different mindset to the one you might<br>
have when writing regular Python code, so it may not seem so strange to<br>
developers once they've accepted that.<br>
<br>
Secondly, it makes it possible to write a more faithful implementation of<br>
Python using code that looks a lot like Python, instead of Java. You could<br>
use it to write support code for a compiler, or perhaps write an interpreter<br>
in it.<br>
<br>
It's all very experimental at the moment. I've been uncomfortable about<br>
publishing it before now because I keep finding things I've overlooked,<br>
though it's been a good learning experience. Maybe there will be things in<br>
there that people find useful.<br>
<br>
David<br>
_______________________________________________<br>
Mobile-sig mailing list<br>
<a href="mailto:Mobile-sig@python.org">Mobile-sig@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/mobile-sig" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/mobile-sig</a><br>
</blockquote></div>