Skip to content

Latest commit

 

History

History
71 lines (43 loc) · 1.6 KB

python.md

File metadata and controls

71 lines (43 loc) · 1.6 KB

Python

Getting Started

Install Python

Install setuptools:

Install pip:

From here on, everything is fun:

pip install [whatever]

Using Virtualenv

Installing new packages is fun in the beginning. However, quite quickly you may end up requiring different configurations for different projects.

With virtualenv, you can create project-specific configurations of Python modules and packages.

Craeting a new virtualenv:

virtualenv [envname]

Activating it:

./envname/Scripts/activate

Note: if you are using Windows [[PowerShell]], you may need to change your execution policy!

REST Programming in Python

Check out python-requests library: https://github.com/kennethreitz/requests

Prebuilt packages for Windows

See: http://www.lfd.uci.edu/~gohlke/pythonlibs/

Deployment

Deploying on Linux Server with Fabric

Framework-specific guides:

On server:

pip install fabric

Preparing for Python 3

Some background: http://www.python.org/doc/essays/ppt/euro2008/Py3kEuro08.pdf

Use -3 switch to warn about obsolete stuff:

python -3 yourscript.py

Make sure test suite is comprehensive.