IDE
- Eclipse with PyDev
- Mint 13 has version 3.7.2, current is 4.2 (1/20/2013)
- http://pydev.org/manual_101_install.html
- Python Anywhere
Modules
- setuptools
- Linux Mint Software Manager has package for Python 2 and 3
- OAuth2
- Need to install setuptools module first
- Download and extract zip from https://github.com/simplegeo/python-oauth2
- Copy to clipboardsudo ./setup.py install
- Consuming Twitter’s Streaming API using Python and cURL
Tutorials
- Good python tutorial
List properties of an object/class
- Copy to clipboarddir(a)
- Copy to clipboarda.__dict__
- Copy to clipboardhelp(a)
- displays docstrings
python-oauth2
- https://github.com/simplegeo/python-oauth2
- Copy to clipboardimport oauth2 as oauth consumer = oauth.Consumer('consumer-key-here','consumer-secret-here') token = oauth.Token('access-key-here','access-key-secret-here') client = oauth.Client(consumer, token) response, content = client.request('http://someservice.com/api/something/')
- Make a post call:
- Copy to clipboardimport urllib response, content = myclient.request("http://someservice.com/api/something/", \ method="POST", body=urllib.urlencode({'name': 'value', 'another_name': 'another value'}) )
-
Version
- Copy to clipboardimport sys print sys.version_info
MySQL
- From MySQL: http://dev.mysql.com/doc/connector-python/en/index.html
- From package: python-mysqldb http://mysql-python.sourceforge.net/