Python 2.2 for FREESCO 027

What is Python?

python 1), (Gr. Myth. An enormous serpent that lurked in the cave of Mount Parnassus and was slain by Apollo)

  1. any of a genus of large, non-poisonous snakes of Asia, Africa and Australia that suffocate their prey to death.
  2. popularly, any large snake that crushes its prey.
  3. totally awesome, bitchin' language that will someday crush the $'s out of certain other so-called VHLL's ;-)

Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java.

Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface.

The Python implementation is portable: it runs on many brands of UNIX, on Windows, DOS, OS/2, Mac, Amiga… If your favorite system isn't listed here, it may still be supported, if there's a C compiler for it. Ask around on comp.lang.python – or just try compiling Python yourself. Already done for FREESCO by yours truly ;-)

Python is copyrighted but freely usable and distributable, even for commercial use.


  • lewy-lib package
  • utils-1 package
  • aprox. 52 Mb (!) free hard disk space
  • recommended for Pentium class FREESCO machines only

Sample Installation

    [Linux] installpkg
    Now downloading the install script for python...
    Warning: installing software from a 3rd party package could damage your
    router's configuration or make it insecure. You should only install a
    package from an author/site you trust. (1K) [########################] 1K | 1479.92K/s
    1911 bytes transferred in 0.00 sec (666.97k/sec)
    Do you want to view the install script before executing it [y/n]? n
    Continue installing [y/n]? y
     _____       _   _                   ___    ___
    |  __ \     | | | |                 |__ \  |__ \
    | |__) |   _| |_| |__   ___  _ __      ) |    ) |
    |  ___/ | | | __| '_ \ / _ \| '_ \    / /    / /
    | |   | |_| | |_| | | | (_) | | | |  / /_ _ / /_
    |_|    \__, |\__|_| |_|\___/|_| |_| |____(_)____|
            __/ |

    Python 2.2 installation, last edit Apr, 5th, 2002
    Downloading...please be patient, this package is 12.5 Mb....!! (12276K)
    python.tgz [########################] 12276K | 1025.63K/s
    12571551 bytes transferred in 12.00 sec (1023.35k/sec)
    Unpacking...please be patient, this is a big package....
    Do you want to keep a copy of the package in your /www directory [y/n] ? y
    Starting python package... Done

    Installation is complete.
    Now you can use - python

    Make sure to checkout and the samples
    in /mnt/router/packages/python/Python2.2, enjoy ;-)

Note: because of the size of the package, please use your nearest FREESCOSoft mirror to install this package.

Sample run

    [Linux] python
    Python 2.2 (#2, Feb 16 2002, 01:27:31)
    [GCC] on linux2
    Type "help", "copyright", "credits" or "license" for more information.

You are running python now in interactive mode. Type 1+1 and python will respond with the correct answer, euh…..2!2).

You can simply run existing python programs (usually with the extension .py) as follows:


The packages comes with library modules in /mnt/router/packages/python/lib, I also recommend to look at the /mnt/router/packages/python/Python-2.2/Demo directory for python sample code.

[Linux] cd /mnt/router/packages/python/Python-2.2/Demo
[Linux] cd curses
[Linux] python

WARNING: It will start raining on your console after running the above mentioned demo script! Type q to quit.

To make a script execute automatically use the following syntax:

#!/usr/bin/env python
print "hello world"

Save this in a file called, then do:

chmod +x

When you type this mind boggling python program will print “hello world” on your display. Isn't it amazing what technology can do, where will it end? ;-)


Check out the links below for some good tutorials for the python programming language.

dingetje 2005/04/16 23:29

1) This section is blatantly copied from
2) I'm almost certain
freesco/howtos/python.txt (190336 views) · Last modified: 2021/12/26 18:06 (external edit)
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki