Python on Campus
Welcome to the main resource page for Python on Campus held on June 8th, 2013.
- When: Saturday June 8th, 12:30pm to 4:30pm.
- Where: FLEX Lab, Dana Porter Library, LIB-329
All you need to bring is your laptop and power cord, we will provide the place to plug in and knowledgeable volunteer tutors.
- 12:30pm to 1pm Welcome, setup
- 1pm to 2pm Intro to Python
- 2pm to 3pm Break, Install Python Locally
- 3pm to 4:30pm Project: twitter command line client.
Intro to Python
To get started learning to code and Python we will use an interact web based experience powered by iPython.
You will need a modern web browser. We recommend Chrome which can be installed anywhere for free, but Firefox, Safari or IE10 should work as well. Ask a tutor if you need help installing a new browser.
Click the link below to open iPython Notebook.
Last name A to G: http://learn.watpy.ca:8887
Last name H to L: http://learn.watpy.ca:8888
Last name M to Z: http://learn.watpy.ca:8889
There you will find your personalized notebook link.
1) Install Python
At a command prompt typing python should give you a Python prompt:
C:\> python Python 2.7.2 (default, Jun 20 2012, 16:23:33 [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>
On Mac OS X and Linux it is possible Python is already installed but it may not be Python 2.7.x.
For Mac OS X you can get an installer for the latest Python for your OS version on the Python website.
For Linux use your distribution's packages manager (apt-get for example).
If you have any trouble please ask a tutor for help.
2) Install Pip
On Windows (32bit) download the installer from this page https://pypi.python.org/pypi/setuptools. If you are using 64bit Windows as a tutor or try to follow the instructions on the previous link.
For Mac OS X you can download ez_setup.py and run it (
python ez_setup.py) to install easy_install. Once easy_install is installed you can run
to install pip.
For Linux use your distribution's package manager:
apt-get install python-pip
3) Pick an Editor
Having a good text editor helps prevent issues you may have with whitespace in the beginning. There are plugin for common editors like VIM, Emacs and Eclipse. If you don't have an editor of choice yet one to try for today is Komodo Edit.
No matter what editor you use, set it up to use spaces instead of tabs and make the indent 4 spaces.
The project is divided in a several small goals. The process will be to practice developing with Python. Editing files, saving them, running the code via the command line.
The project is to create a command line utility to read, post and search Twitter.
- Click on Learn in the main navigation. Join the Google Group and checkout the resources
- Keep learning, try to Python tutorial now you can develop with the IDLE and ask questions ont he Google Group.