Python: Difference between revisions

From 太極
Jump to navigation Jump to search
Line 36: Line 36:
* [http://kevinmehall.net/p/pithos/ pithos] Pandora on linux
* [http://kevinmehall.net/p/pithos/ pithos] Pandora on linux
* Many Raspberry Pi GPIO projects
* Many Raspberry Pi GPIO projects
* [http://csbio.unc.edu/genescissors/instruction.html GeneScissors] It also requires pip and scikit-learn packages.

Revision as of 16:10, 23 June 2013

How to run a python code

python mypython.py

Install a new module

The Python Package Index (PyPI) is the definitive list of packages (or modules

sudo apt-get install python-serial

If a package has been bundled by its creator using the standard approach to bundling modules (with Python’s distutils tool), all you need to do is download the package, uncompress it and type:

python setup.py install

How to list all installed modules

help('modules')

How to find the location of installed modules

There are different ways

  1. python -v
  2. import MODULENAME
  3. help('MODULENAME')

Using this way, I find the 'RPi' module is installed under /usr/lib/python2.7/dist-packages.

Projects based on python

  • pithos Pandora on linux
  • Many Raspberry Pi GPIO projects
  • GeneScissors It also requires pip and scikit-learn packages.