Getting started with ActivePython on Linux, AIX, or HP-UX
- Installation location:
/opt/ActivePython-2.7by default, but can be specified at install time.
- Local documentation: Open
/opt/ActivePython-2.7/doc/python2.7/index.htmlin your browser.
Running Python and the Interactive Shell
The ActivePython installer on Linux, AIX and HP-UX installs to
/opt/ActivePython-2.7 by default, but an alternate
install directory (for example, somewhere in your home directory) can be
specified at install time. To be able to simply run
the shell you either need to add this install directory’s
If you use the Bash shell place the following in your
PATH=/opt/ActivePython-2.7/bin:$PATH; export PATH
If you use the
tcsh shell place the following in
setenv PATH /opt/ActivePython-2.7/bin:$PATH
Alternatively, you can create symlinks from some directory already on your
sudo ln -sf <strong>/opt/ActivePython-2.7</strong>/bin/python2.7 /usr/local/bin/python2.7 sudo ln -sf /usr/local/bin/python2.7 /usr/local/bin/python
python in the shell. (If you modified your shell startup
script, you may need to start a new shell to see the PATH changes.) You should
see something like the following:
ActivePython 18.104.22.168 (ActiveState Software Inc.) based on Python 2.7.13 (default, Mar 21 2017, 09:33:37) [GCC 2.7.13 (SuSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
You can use the Python shell to interactively run Python code. This can be
very useful development and debugging tool. Learn how to use Python’s built-in
introspection functions to dive into Python objects. For example, try running
>>> import os.path >>> dir(os.path) list of members of os.path module... >>> help(os.path) MAN page-like description of the os.path module... >>> help(os.path.join) help on the join function...
Read the Python Tutorial for more information.
Tkinter is Python’s binding to the cross-platform Tk GUI toolkit and is a default part of any ActivePython installation on Linux, AIX and HP-UX.
wxPython is another popular cross-platform GUI programming toolkit. It is available separately from http://www.wxpython.org/.