Looks like Python is supported:

http://google-opensource.blogspot.com/2009/06/introducing-android-scripting.html

On Thu, Sep 30, 2010 at 9:51 PM, geremy condra <[email protected]> wrote:

> On Thu, Sep 30, 2010 at 9:25 PM, Mike Orr <[email protected]> wrote:
> > This is a bit off topic but it does get a little into Python. I don't
> > know much about the smartphone world. I got my first trusty-rusty
> > cellphone in 2000 when I started travelling, then around 2006 it died
> > and I got a hand-me-down that's essentially identical, one of those
> > that barely does texting. I was just waiting until smartphones became
> > open enough (non-proprietary, ideally Linux) and established enough
> > (so it wouldn't get unsupprted or obsolete in a year or two), and I
> > had a specific need for it (portable email and web would be nice but
> > is not necessary for me, but now I've seen that OneBusAway would be
> > useful to see when a bus is coming if it's late). And having something
> > I could program in Python on would be a bonus.
> >
> > So, Android looks like it's a step closer to what I've been waiting
> > for, although I'm not quite sure if it's relevant enough for me to
> > actually get one. But I'm curious, and now I have to do something
> > because my AT&T phone doesn't work inside half my apartment, so I
> > either have to get on my roommate's T-Mobile family plan or get an
> > Android, and it would be silly to do one now and the other a few
> > months later, so I'm looking more closely at it. But I don't know
> > basic things like where do you get one, how do you choose between the
> > different kinds/brands, how do you find one that's not locked to a
> > single carrier, etc?
>
> You can get an Android phone from any of the major carriers. The four
> majors each have a variety of both top- and mid-tier devices running
> it, and you can either buy the phones from them, through middlemen
> like RadioShack or WalMart, or online from Amazon etc. Verizon,
> Sprint, and T-Mobile all allow you to buy them off-contract, and if
> you're buying a top-tier phone and have the cash to buy off contract
> you should.
>
> As for the different kinds and brands, you can check out the writeup I
> did on the topic on my buzz[0]. Personally I don't think what I wrote
> there is much less accurate today than it was back then, but YMMV. The
> new G2 also looks to be pretty amazing, so if you're already leaning
> towards T-Mobile that might be enough to tip the scales in its favor.
>
> > And does it do Python? the FAQ says you write apps in Java and it
> > compiles them to a custom embedded language. Does that mean Jython
> > works on it? And can I get a Python interpreter directly on the phone
> > or is that too big for its memory?
>
> The best answer I can give you is... maybe. There are a few things
> going on here.
>
> First, Jython doesn't work. Jython emits Java bytecode; Android uses
> Dalvik bytecode, which I'm told is different enough to make
> retargeting prohibitive.
>
> Second, there's SL4A[1], which is a fairly limited way to write simple
> scripts in Python. No lies, it's not a great way to write apps- in
> fact, it frustrated me enough that I wrote a way around it.
>
> That way is your third option- about two years ago I decided that I'd
> had enough of Java and wanted to put a stake in it, so I built a
> system called Javalin that used the JNI and the CPython API to
> mechanically map a Java API into a Python API without actually
> abandoning the working Java codebase. Since Android's NDK provides JNI
> access, I was able to take an existing port of Python3 and
> successfully use the Android API from Python. The good news ends
> there, however: there are both memory/storage constraints to worry
> about (a full Python interpreter is no joke on a mobile device,
> although things have ramped up a lot since my G1 came out) and some
> questions about ownership, etc.
>
> So, the bottom line is that you can use Python, but probably aren't
> going to get to distribute Python applications unless Google decides
> that's a good idea.
>
> [0]
> http://www.google.com/buzz/debatem1/9gyrLd7K4su/So-everybody-and-their-brother-keeps-asking-me-for
> [1] http://code.google.com/p/android-scripting/
>
> Geremy Condra
>
>


-- 
Mark McWiggins
425-369-8286 (cell)

Reply via email to