News | About | Get Frugalware | Packages | Documentation | Discussion Forums | Bug Tracker | Wiki | Community | Development

Python

From FrugalWiki

Jump to: navigation, search


Contents

Introduction

This entry will cover installing Python, and provide some references.

Installation

There are currently two versions of python: Python 2 (which is the default) and the next version, Python 3.

Python

Root terminal 48px.png
# pacman-g2 -S python


Python

To install the latest version of Python 3, run:

Root terminal 48px.png
# pacman-g2 -S python-3.0


Getting easy_install

The easy_install tool is available in the package python-distribute

Root terminal 48px.png
# pacman-g2 -S python-distribute


Misc. Uses

Python is excellent for emergency situations, or when you simply need to work with files without writing any Perl, Bash, or C. Here are some functions that I have found to be helpful (although this is by no means a comprehensive list);

open - open a file
urllib.urlopen - open a web page, import urllib first
urllib.urlretrieve - download a file (by default, to /tmp, but a directory can be specified), import urllib first
os.listdir - list all files in a given directory, import os first

You will find that Python is used frequently, in applications ranging from the GIMP, to Sage. Python's scalability, popularity, and ease of coding makes it an important addition to all desktops.

More Resources

Personal tools
Namespaces
Variants
Actions