Skip to content

gavrie/pycourse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to the Python course at IBM.

Installation

We will be using Python 2.7 along with these tools:

  • The IPython interactive environment
  • The pytest unit testing framework

Ubuntu Users

  • Install the Python prerequisites:
sudo apt-get install python-pip
sudo pip install ipython pytest
  • Test if it works:
ipython

Windows Users

The easiest method is to install ActivePython with PyPM.

Note: Even if you have a 64-bit version of Windows, please install the 32-bit version of ActivePython. The 64-bit version is known to be problematic.

pypm -g install pyreadline
pypm -g install ipython
pypm -g install pytest
  • Test if it works by running IPython from the Windows menu or from the PyPM command prompt.

Editors / IDEs

  • Most standard programmer's editors support Python out of the box: Vim, Emacs, Sublime etc.
  • Eclipse supports Python with the PyDev plugin. You can also use the pre-packaged Aptana Studio environment if you don't have Eclipse installed yet.

Resources

Configuring Tab Completion

To get tab completion to work in the regular Python interactive shell, add the following lines to the file ~/.pythonrc.py (create it first if it doesn't exist):

try:
    import readline
except ImportError:
    print("Module readline not available.")
else:
    import rlcompleter
    readline.parse_and_bind("tab: complete")

In addition, add the following line to your ~/.bashrc file:

export PYTHONSTARTUP=~/.pythonrc.py

Have fun!

Gavrie Philipson

About

New Python course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages