ANN: Python 2.3.2 for PalmOS available

L

lucio.torre

Hello,

Some months ago i did a port of the Python2.3.2 interpreter to PalmOS.
I didnt port any C module or created modules for PalmOS API's. But you
can run an interpreter and use stdin/stdout from a form.

There is also a tool to freeze scripts and use the interpreter as a
pseudo-shared library.

While talking with Facundo while in a PyAr meeting (python-argentina,
http://www.python.org/ar ) he told me that there is some interest in
this platform.

So, ive made an initial release that has no documentation on how to use
it or compile it (it requires codewarrior). If there is any interest on
this, please let me know so we can work on getting this as a real port.

As usual, this is just a proof of concept and is ugly in many ways.
(ie, in Palm, code segments must be less than 64K, so some files had to
be split and rearranged ).

If anyone want to check this out, heres the url:
http://pyar.decode.com.ar/Members/ltorre/PythonPalm

Regards,

Lucio.
 
W

Wolfgang Keller

If there is any interest on this, please let me know so we can work on
getting this as a real port.

"Interest" is just a "slight" understatement... :)

Best regards

Wolfgang Keller
 
K

Klaus Alexander Seistrup

Some months ago i did a port of the Python2.3.2 interpreter to
PalmOS.

Wow, this is just what I've been waiting for. Meanwhile I've tried
to make do with Rexx for PalmOS, hehehe...

However, MLPY doesn't seem to work on my Tungsten T3 (PalmOS 5.2.1).
The .prc installs without any problems, and I can start the Python
interpreter, but nothing happens if I ring in a Python expression and
press return -- the prompt just "hangs" and never returns.

Any ideas?
 
P

Peter Hansen

Klaus said:
Wow, this is just what I've been waiting for. Meanwhile I've tried
to make do with Rexx for PalmOS, hehehe...

I've been making do (rather successfully so far) with
Plua 2 (basically Lua 5.0), which I think feels a
little closer to Python than does Rexx (but which
doesn't come, out of the box, with quite as much
power).

The main benefit is that it *does* support the Palm
OS stuff, mainly making a UI form, an event loop,
and interfacing with databases.

It would be wonderful if Python was equally well
supported (yes, I know, somebody has to do the work)
but I also suspect there's no hope of it running on
my old 2MB Palm V the way Plua currently does! :)
Well, it would finally be a reason to upgrade though...

-Peter
 
B

bryce.moore

Lucio,

Just tried to install it on my sony clie PEG-S360. When I try to run
it I get:
Fatal Alert
pythonrun.c, Line: 1483,
Py_Initialize: can't init ints

Aside from my clie being significantly under-powered, I don't know what
else could be wrong.

What version of the Palm OS does this support?

Good luck with this. I could use a more up-to-date python than Pippy
(http://pippy.sourceforge.net/) offers.

I didn't know where else to post / email this.

bryce
 
E

Erik Max Francis

Klaus said:
However, MLPY doesn't seem to work on my Tungsten T3 (PalmOS 5.2.1).
The .prc installs without any problems, and I can start the Python
interpreter, but nothing happens if I ring in a Python expression and
press return -- the prompt just "hangs" and never returns.

It worked on my Treo 650, although you quickly ran out of space in the
input text area (if you typed too many characters it would beep and
prevent you from typing anymore).
 
M

Michael Hoffman

Some months ago i did a port of the Python2.3.2 interpreter to PalmOS.
I didnt port any C module or created modules for PalmOS API's.

Just port ctypes. Then we'll be good to go. <wink>

Seriously, this looks like a cool beginning.
 
L

Lucio Torre

Make sure you write the expression in the lower text-area, and then
press the send button. This should do it.

I did the port something like a year ago (when i didnt knew metroweks
for Palm was discontinued) and when i tried it last week i couldnt
figure out how to use it. Then i realized that i must use the lower
text-area. Its was not designed for ease of use :)

Lucio.
 
L

Lucio Torre

Most likely you run out of stack. The amount of memory this beast
required for initialization was too much for most old Palms.

Ive tried it on PalmOS simulator mainly, and on some version of OS5
hardware.

Lucio.
 
P

Peter Hansen

What are the potential applications of Python on PalmOS? Just curious.

Python is a general purpose programming language,
as you know. Doesn't that suggest that the
set of potential applications is pretty much all
those which don't require the raw performance of
C or perhaps some highly specialized feature
available only in another language (if such a
thing even exists)?

Calendar tools, time tracking tools, games,
various kinds of network clients (for the latest
Palms), etc. I've just written a very specialized
time tracking tool in Plua, which could easily have
been done using Python if it had access to the
UI elements and the file system as Plua does.

Given that you already know what Python is all about,
your question sounds to me like that of someone who
doesn't even know what a Palm is good for... which
I doubt you are, so I find the question rather puzzling.

-Peter
 
F

Fraca7

While talking with Facundo while in a PyAr meeting (python-argentina,
http://www.python.org/ar ) he told me that there is some interest in
this platform.

You bet there is. i almost bought a Pocket PC instead of my Clié TH55
because I thought Python would be available sooner on it...
So, ive made an initial release that has no documentation on how to use
it or compile it (it requires codewarrior). If there is any interest on
this, please let me know so we can work on getting this as a real port.

I'm a beginner at PalmOS programming (actually, I've read a book about it,
and that's it) but I'd be glad to help...
 
K

Klaus Alexander Seistrup

Lucio said:
Make sure you write the expression in the lower text-area, and
then press the send button. This should do it.

Ah, that's the trick! It wasn't obvious that there were two text areas,
and I intuitively wrote commands at the python prompt. Problem solved.

Say, are floats implemented? Comparisons seem to work, but print'ing
doesn't:

#v+

#v-
 
L

Lucio Torre

Klaus said:
Lucio Torre wrote:

Say, are floats implemented? Comparisons seem to work, but print'ing
doesn't:

#v+
I think thats a problem with the printf implementation. Im using one
that came with codewarrior and maybe it doesnt parse %.*g .. (never
seen that format before)..

Lucio.
 
L

Lucio Torre

Fraca7 said:
port.

I'm a beginner at PalmOS programming (actually, I've read a book about it,
and that's it) but I'd be glad to help...

Do you have any experience on PODS? The whole thing is based on
Codewarrior and Codewarrior for palm is dead.

Lucio.
 
E

Erik Max Francis

RM said:
I get odd results when trying to use exponents. For example:

6

Someone else already pointed out that ** is exponentiation. ^, on the
other hand, bitwise exclusive or.
 
F

Fraca7

Do you have any experience on PODS? The whole thing is based on
Codewarrior and Codewarrior for palm is dead.

Nope. Actually, I'm kind of reluctant to use IDEs and it seems PODS is
targeted towards Eclipse users; I'd rather use prc-tools since I'm used to
the GNU development tools.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top