Dave Horner's Website - Yet another perspective on things...
Home Tech Talk Programming Python - a playful python for programming
72 guests
Rough Hits : 2997839
moon and stars
how did u find my site?





 
onomastics (seen in code)












 
Don't worry about what anybody else is going to do. The best way to predict the future is to invent it. -- Alan Kay
1=0.999...

Python - a playful python for programming

Wednesday, 25 October 2006 10:45
Python is a great programming language. One of the best parts of this language is that it can be used tightly with C and C++. Python is concise and cleanly formatted. Python is portable. It can be used cross platforms.

Everything in Python is an object and multiple inheritance is allowed.

Remember: Beautiful is better than ugly.

Python for Fun
Learn Python in 100 Python Session Log Lines: A Python Demo « sysblogd
Python Tips, Tricks, and Hacks - Siafoo - pretty great page on all sorts of things python.
zone.effbot.org

Python in Science: How long until a Nobel Prize? | And Now For Something Completely Different, Nov. 2007

Singleton? We don't need no stinkin' singleton: the Borg design pattern « ActiveState Code
Transforming Code into Beautiful, Idiomatic Python - YouTube Transforming code into Beautiful, Idiomatic Python by Raymond Hettinger (Speaker Deck)


kachayev/fn.py - Functional programming in Python: implementation of missing features to enjoy FP

__repr__ and __str__

So whats the difference with __repr__ vs __str__?
__repr__ is usually equal to __str__, but __repr__ is constrained by the following truth:
eval(obj.__repr__()) = obj
__str__ is used many times to pretty up or format the data within.
The __str__ method ((An Unofficial) Python Reference Wiki)
Python dictionary from an object's fields - Stack Overflow - sometimes you want to quickly print the member variables of a python object...__dict__ gives you that...


Dive Into Python - A very nice tutorial on python....a good read.
Python Scripting: Overview, Resources and Books
Python Tutorial (release 2.5.2) Python Library Reference
New-style Classes - references on class definitions and what not.
Python Network Programming


easy_install and setuptools

Building and Distributing Packages with setuptools
PEAK - Easy Install
setuptools and Python Paste
Yolk - Trac - yolk will tell you what you've installed with setuptools, easy_install and distutils. Also query tool for pypi.
Installing easy_install on Fedora, or other yum based systems.
yum provides \*/easy_install
yum install python-setuptools-devel


Tutorial - Embedded Python


Python ORMs and query stuff

Dee - think linq for python.
HigherLevelDatabaseProgramming - PythonInfo Wiki - list of ORMs for python...and other stuff.
FrontPage - Storm - Storm is an object-relational mapper (ORM) for Python developed at Canonical.
Geniusql - Trac - low-level Object-Relational Mapper for Python applications.
Dejavu - Trac - Dejavu uses Geniusql behind the scenes for RDBMS back ends, but allows you to mix and match them with RAM, filesystem, and other stores.


mysqldb

Writing MySQL Scripts with Python DB-API
MySQLdb User's Guide
Not sure why, but I get Python AttributeError: 'Cursor' object has no attribute 'insert_id' when using int(cursor.insert_id()) with mysqldb. Instead use (cursor.lastrowid)...which works! :)
MySQL for Python in Windows - Stack Overflow


SQLObject - ORM

Connecting databases to Python with SQLObject

SQLAlchemy - ORM

SQLAlchemy - The Database Toolkit for Python
sqlalchemy-migrate - Google Code - auto generate schema and python models.
SQLAlchemy 0.5 Documentation - Object Relational Tutorial
Elixir – Trac - Elixir is a declarative layer on top of the SQLAlchemy
formalchemy - Project Hosting on Google Code - Auto-generated, customizable HTML input form fields from your SQLAlchemy mapped classes.
Welcome to FormAlchemy’s documentation! — FormAlchemy v1.3.4 documentation


Django

Django
The Django Book
The Django Book: Version 2.0 (English)
import this. » Django on Windows
Sh*tmores: Exploring Django - The Basic Cygwin Setup (1)
Django Pluggables • Find reusable applications for your Django project, quickly and easily!
Django snippets: Top-rated snippets
Quick tour screencast showing django
django-rest-interface - Google Code
django-tinymce - Project Hosting on Google Code
installationbasic - django-filebrowser - Project Hosting on Google Code
Django snippets: Welcome
Pinax - built up using django.
Contributing to Pinax — Pinax v0.9alpha1 documentation - developer notes for working from git.
This Week in Django - This Week in Django
Django on Twisted Web - Using the latest twisted.web.wsgi functionality
sunlightlabs's django-secretballot at master - GitHub
ericflo's twissandra at master - GitHub - Twissandra is an example project, created to learn and demonstrate how to use Cassandra. Running the project will present a website that has similar functionality to Twitter. (python virtualenv,pip,cassandra,Thrift)
jespern / django-piston / wiki / Home — bitbucket.org
montylounge/django-mingus - GitHub -a Django blog engine leveraging reusable apps for all its features.
Speeding Up Mingus | joshbohde.com - Using StaticGenerator to make Mingus fast.
Django plugins you shouldn't start without


Pylons

Pylons is a lightweight web framework emphasizing flexibility and rapid development. Pylons’ core tools including FormEncode, Mako, SQLAlchemy, and Routes. Built up from other successful python projects...
PylonsHQ - Home - pylons home.
The Definitive Guide to Pylons - James Gardner — Pylons Book v1.1 documentation - pylons book
Jonathan Ellis's Programming Blog - Spyced: A small admin app for Pylons


GeoDjango - did YOU know about django's GIS capabilities?

GeoDjango - GIS extensions to django!
Installing GeoDjango with PostgreSQL and zc.buildout — Stereoplex


JSON in python

simplejson -- A simple, fast, extensible JSON encoder and decoder


JSON response in django

simple use of simplejson on someobj.
from django.utils import simplejson
return HttpResponse(simplejson.dumps(someobj), content_type='application/json; charset=UTF-8')


I've needed to do this sorta stuff before when using old code...
newforms-admin Migration and Screencast | oebfare
NewformsAdminBranch - Django - Trac
Everyblock is written in Python, using the Django Web framework. It requires PostgreSQL and PostGIS.
EveryBlock — A news feed for your block
ebcode - Project Hosting on Google Code



Python and IRC
Getting Twisted
pyzine.com -online zine for python

Py++ is an object-oriented framework for creating a code generator for Boost.Python library.
Python-Ogre
PyOgre
Python, MD5, duplicate files finder
The path Python module

Pyre.
Python Frameworks for Geoscience Visualization and Analysis

pygccxml
VideoCapture - win32 extension for video in python.
Open Source Python GIS Hacks


Module search path

1. current directory (interpreter prompt) or directory of the input script
2. directories specified in the PYTHONPATH environment variable
3. installation-dependent system paths, such as c:\python24\lib for the library of standard modules and c:\python24\lib\site-packages for installed non-standard modules.

The PYTHONPATH variable is useful with uninstalled bundles such FWTools.

Pre-built packages for Python on Mac OS X


Linguistics and NLP

Charming Python: Get started with the Natural Language Toolkit


Science/Math Tools

SciPy: Scientific Tools for Python
Python Scientific Lecture Notes — Scipy lecture notes
Matplotlib - RIP John Hunter (1968-2012) matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms.
Numerically Python

Pygr
NetworkX
generating python module dependency graphs
Computing eigenvalues for quantum maps (using python)
StatPy: Statistical Computing with Python
Importing Python Modules
PyEvolve: a toolkit for statistical modeling of molecular evolution


Refactoring in pythong

Rope, a python refactoring library ...
Rope Overview

Python Unittests

Python Unit Testing Framework
PyUnit
Installation and quick start — nose documentation
py.test index
Your way out of The Lack of Testing Death Spiral - Pythoscope
Writing clean, testable, high quality code in Python

Python Projects

Itaka - on-demand screen capture server
Python Call Graph
PyObjC - The Python <-> Objective-C Bridge
Vision Egg - a powerful, flexible, and free way to produce stimuli for vision research experiments.
Pyro - About - PYthon Remote Objects provides an object-oriented form of RPC. couchquery – A Python library for CouchDB — couchquery v0.3 documentation


C/C++ wrapping

Riverbank : SIP : Overview
Simplified Wrapper and Interface Generator
Wrap GObjects in Python

Nuitka - python to C++! kayhayen/Nuitka

IronPython

IronPython is Python in the .NET DLR. Mono ships IronPython
IronPython goes to MSIL so you get the advantage of using all the power of visual studio debugging support! Very cool
IronPython is a new implementation of the Python programming language running on .NET.
IronPython - Release: 1.0 Production - (check here for the 1.0 samples)
IronPython Blog
IronPython Studio - integrate IronPython into Visual Studio.
(IronPython Studio requires the vs shell)
Download details: Visual Studio 2008 Shell (isolated mode)
Planet IronPython
Main Page - IronPython Cookbook
Basic Handwriting Recognition - IronPython Cookbook
FePy project aims to provide enhancements and addons to IronPython.
FePy - project aims to provide enhancements and add-ons for IronPython, an implementation of Python programming language.
FePy Blog
*IronPython run in Silverlight outperforms traditional Javascript by a couple of orders of magnitude*
Qouted from Introduction to IronPython & Silverlight.
IronPython is the new IValueConverter, IMultiValueConverter
The PyBinding MarkupExtension: use Python statements for Data Binding
Sho - Microsoft Research - Sho is an interactive environment for data analysis and scientific computing that lets you seamlessly connect scripts (in IronPython) with compiled code (in .NET) to enable fast and flexible prototyping.
NumPy and SciPy for IronPython / .Net


Editors

The Eric Python IDE
Pydev - Eclipse plugin which makes eclipse an excellent auto-completing python editor.
Python Tools for Visual Studio


interfaces to python || python shell

FrontPage - IPython - IPython: an interactive computing environment
IPython and virtualenv | And Now For Something Completely Different
bpython interpreter
Welcome to DreamPie!
Review of bpython and DreamPie (alternative Python shells) - Python Central


If you ever get an error like:
error: invalid Python installation: unable to open /usr/lib/python2.5/config/Makefile
You can fix it by installing the development packages for your python installation. ie. yum install python2.5-devel

web2py Enterprise Web Framework


ElementTree Overview - xml processing library for python, comes with 2.5 out of the box.



REST in python

CherryPy Tutorial - CherryPy - Trac
Intro to CherryPy - CherryPy - Trac
selector - WSGI Delegation


Template languages

As always, there are 1000 template choices....
Mako Templates for Python
Kid - Pythonic, XML-based Templating
Cheetah - The Python-Powered Template Engine


HTML parsing

Beautiful Soup is an HTML/XML parser for Python that can turn even invalid markup into a parse tree.
html5lib - Project Hosting on Google Code - Library for working with HTML documents (Python and PHP implementations of a HTML parser based on the WHATWG HTML5 specification)
Scrapemark - Easy Python Scraping Library - a regex oriented scraper.


concurrency

Stackless.com - About Stackless - concurrency
Kamaelia
MPI for Python PI for Python (mpi4py) provides bindings of the Message Passing Interface (MPI) standard for the Python programming language, allowing any Python program to exploit multiple processors.
The Kitware Blog - mpi4py and VTK


PyCap - Pycap wraps the sweet sweet PopCap Game Framework in a super friendly high level python interface. With Pycap you can start building pretty 2D games without installing a compiler or learning C++.


twisted async network programming

Twisted Documentation: Twisted Documentation
Running a Twisted Perspective Broker example with twistd - SaltyCrane Blog
Event-Driven Programming with Twisted and Python
Twisted Documentation: Generating Deferreds
Writing an Markov-Chain IRC Bot with Twisted and Python - Die in a Fire - Eric Florenzano’s Blog
Wokkel - enhancements to the Jabber/XMPP protocol implementation as found in Twisted Words, that are meant to eventually move there.


orbited

Orbited – Networking for the Web - uses twisted and MorbidQ to support STOMP. Quite simple to install using easy_install.
easy_install orbited
easy_install simplejson
Traits and Orbited


Python on the mac

Using fink makes it painless to install python and some popular python libraries.
# as always it is nice to update fink (things work better that way)
fink selfupdate
fink update-all
fink install scipy-py25
fink install matplotlib-py25
fink install pygame-py25
fink install ipython-py25
# create this link to make python2.5 the default python on the cmdline.
sudo ln -s /sw/bin/python2.5 /sw/bin/python

Python on windows

I just install the standard python installer for the latest...
Download Python Software
Then you'll wanna add python and python\scripts to the path in your environment. Then I install easy_install using the script.
http://peak.telecommunity.com/dist/ez_setup.py download and run with python.
Then I install the pywin32 package as well.
Browse Python for Windows extensions Files on SourceForge.net
Python Extension Packages for Windows - Christoph Gohlke - includes numpy-MKL and scipy.
Stand alone Python for Windows - It includes all of the extension modules that are included with the official release. It does not use the registry and can be installed in any directory.


pyweek - contest where people write python games in a week...
pyglet - a cross-platform windowing and multimedia library for Python.


cocos2d

city41's CocosNet at master - GitHub - port of Cocos2D to C#.
cocos2d - a framework for building 2D games, demos, and other graphical/interactive applications.
Cocograph - devdev-python - Project Hosting on Google Code
cocos2d games « cocos2d for iPhone - forum where people post info about the cocos2d games in the app store.


PythonGameLibraries - PythonInfo Wiki - python has a lot of libraries....woow.

WSGI in python

ModPythonGateway - AMinus projects - Trac - How to set up mod_python for use as a WSGI server
flup: random Python WSGI stuff - Trac
Slicehost Articles: Ubuntu Hardy - Using mod_wsgi to Serve Your Application
modwsgi - Project Hosting on Google Code - simple to use Apache module which can host any Python application which supports the Python WSGI interface.
IntegrationWithTrac - modwsgi - How to use Trac with mod_wsgi. - Project Hosting on Google Code
WSGI Wrestle 2013
The uWSGI project — uWSGI 2.0 documentation - a full stack for building hosting services.



Mercurial python DVCS

tawm / Mercurial Recipe / overview — bitbucket.org - zc.buildout recipe for cloning and/or pulling a Mercurial repository.
Refactor the Life » Blog Archive » HOWTO setup the Mercurial with Nginx in CentOS 4
tortoisehg / stable / wiki / Home — bitbucket.org - TortoiseHg is a Windows shell extension much like TortoiseSVN and a series of applications for the Mercurial distributed revision control system. It even uses TortoiseSVN overlays.

Buildout

Buildout Tutorial — Buildout v1.2.1 documentation
Developing Django apps with zc.buildout


Paver

Paver: Easy Scripting for Software Projects — Paver v1.0.1 documentation
paver - Project Hosting on Google Code - Paver: easy build and deployment scripting
Paver: easy build and deployment automation for Python projects (#13) - PyCon 2009 - Chicago - A Conference for the Python Community
Converting from Make to Paver - O'Reilly Broadcast
dinoboff's paver-templates at master - GitHub - Create the the layout of a paver-enable package (paster create -t paver_package <package name>)



Fabric

Fabric, Django, Git, Apache, mod_wsgi, virtualenv and pip deployment | Morethanseven
Tools of the Modern Python Hacker: Virtualenv, Fabric and Pip
Recipes - wiki.fabfile.org - Fabric's wiki on Fab recipes.
Fabric — Fabric v0.9 documentation
Notes on Python Fabric 0.9b1 « SaltyCrane Blog


Sphinx

Writing Technical Documentation with Sphinx, Paver, and Cog - O'Reilly Broadcast
Overview — Sphinx v0.6.3 documentation

Cog code generator

Cog transforms files in a very simple way: it finds chunks of Python code embedded in them, executes the Python code, and inserts its output back into the original file.
Ned Batchelder: Cog - embed python code generation tool.
Code Generation with Python, Cog, and Nant


virtualenv

making isolated envs in python is way cool.
Setting up virtualenv — NIPY Documentation
Working with virtualenv — Arthur Koziel


Python HTTP automation and other web python thingys

mechanize - Stateful programmatic web browsing in Python, after Andy Lester's Perl module WWW::Mechanize.
twill: a simple scripting language for Web browsing


Zope and related things

Repoze - Repoze is a collection of technologies which bridges WSGI and Zope .
Revotera Voja?o: Buildout with Repoze, Zope, and Plone



Unicode in Python

How to Use UTF-8 with Python
How to replace non ascii characters in string? - Stack Overflow


Python internationalization

Babel - A collection of tools for internationalizing Python applications (gettext message catalogs, CLDR (Common Locale Data Repository))


PyX - Python graphics package - Python package for the creation of PostScript and PDF files.


PIL decoder JPEG not available

"decoder jpeg not available"


Silver Lining

open source cloud automation, great stuff....
libcloud python library - a unified interface to cloud server providers
Silver Lining — Silver Lining v0.0 documentation
Silver Lining, Shabti and “the cloud”


tobami/overmind - GitHub - project aims to provider a complete server provisioning and configuration management application. (django,libcloud,django-celery,RabbitMQ,django-piston)
ssimasanti/boatyard - GitHub - Git push to deploy python web app using nginx + uwsgi + virtualenv + pip.
ssimasanti/rockets - GitHub - Cloud server management tools using fabric + libcloud + django cli.


greenlet

greenlet: Lightweight concurrent programming - A "greenlet" is a small independent pseudo-thread
Evented Django part one: Socket.IO and gevent | codysoyland.com
Jeffrey / gevent-socketio / source – Bitbucket


Celery

Celery - The Distributed Task Queue
Celery is an open source asynchronous task queue/job queue based on distributed message passing. It is focused on real-time operation, but supports scheduling as well. The recommended message broker is RabbitMQ.
ssimasanti/celery - GitHub
Async Workers in Django with Celery | joshbohde.com


Syntax highlighting in python

Pygments — Python syntax highlighter


Nikola | Nikola - Nikola is a Static Site and Blog Generator (python 2 & 3)


Flask

Welcome | Flask (A Python Microframework) mitsuhiko/flask
mitsuhiko/worldtime-scheduler - A small flask application for scheduling events across different timezones.
Building a Flask Blog: Part 1 | Pypix


Fatal Python error: Py_Initialize: unable to load the file system codec

um ya, huh. This turned out to be Python33 being in the path in front of Python27. Try not to mix up the PYTHONPATH and PATH vars with versions of python, you will get something that looks like this. Cheers.

albertz/pydbattach - inject c code into running python process, c code creates new python thread and runs python script.


cmdline processing in python

docopt—language for description of command-line interfaces - started as a python implementation, all sorts of languages now supported.
15.6. getopt — C-style parser for command line options — Python v2.7.8 documentation - you knew I was gonna say getopt.
Argparse Tutorial — Python 3.5.0a0 documentation
16.4. argparse — Parser for command-line options, arguments and sub-commands — Python 3.5.0a0 documentation

< Prev  Next >
Last Updated on Saturday, 16 January 2016 23:47