What is Python?

Python is a script language for computer.

This means is strongly dedicated to developers. But an advantage of Python is to be relatively easy, like the Basic, to understand and use it. But it can be also used in a more complex and powerfull way, with it's Oriented Object Programing (OOP) paradigm.

Python has been seriously known with its version 1.5. Now latest one is the 3.x serie (last revision is 3.1.1).

Python is one of my first biggest project made for MorphOS. I've started in the end of 2003 and I continue to support it.

MorphOS port has been a long a difficult port, my most difficult one to be honest! It's mainly due to the fact Python uses globals variables and this kind of variables is the most difficult things to support with AmigaOS libraries.
But I've prove that it's possible ;-)
…Event dynamics modules is supported!

But sure, some limitations exists. I'll make a page about that someday.

On last thing to know about the port: it's a native port, so AmigaOS path is supported, not posix! This can be lead to some headhaches if you attemps to use posix designed external third-parties!

Python on MorphOS is currently only available on 2.x serie. But I'm working on 3.x (3.1.1) and a release is comming soon!


3.x Serie

Continue on the 3.x Serie page (In development… please wait ;-))

The latest one, but carefully here: strong modifications in the language and API!
The most known: print is now a function!

print("Hello World!")

2.x Serie

Continue on the 2.x Serie page

The most used version of Python used in the World!

This serie is ported since 7 years on MorphOS now. It could be used for a wide range of projects.
I'm using this one for my own projects: PyMUI and Gribouillis.

General Information


Note: following text only applies on versions > 2.5.4. Previous versions are not longer supported.

IMPORTANT: for users of 2.5.4 -r42 and before: delete LIBS:python.library (replaced by a new library name) and update immediately your system. All compiled dynamics python modules (*.pym) shall be rebuilt with the new SDK also.

  1. Download the wanted version archive (see for each serie section Downloads), and put it for example in RAM:.
  2. Uncompresse and unarchive this file using following Shell command:
    XADUnTar RAM:pythonarchiveXXX.tar.bz2 RAM:
  3. A new directory named Python-X.Y.Z-N is created. From this last, copy contents of:
    • C to C:.
    • Libs to Libs:.
    • 1) DevEnv to usr:local.

Quick Startup

The Python interpretor pythonX.Y2) installed in C: can be executed from any MorphOS Shell consoles. Note that for 2.x, the copy is also found as python, this one is used by 2.x compatible scripts.
To know pathnames from where Python is searching for scripts imported by command import, you can type following Shell command in a console:

pythonX.Y -c "import sys; print(sys.path)"

Notes: this code works on 2.x and 3.x.

By default, the following pathname3) is used: LIBS:pythonX.Y, where X and Y corresponding to same values as the archive's name in chapter Installation.

1) only for ones have installed the MorphOS developing environment
2) don't forget to change X.Y by the version number
3) others with less importance are also added

en/dev/python/start.txt · Dernière modification: 2011/12/09 23:51 par Yomgui