Google's Python Style Guide

http://google-styleguide.googlecode.com/svn/trunk/pyguide.html

Continue reading »

Python: ‘==’ not the same as ‘is’

my good friend Chris P. was helping me with some python debugging and he pointed this thread out to me on the python Tutor list.

Thank you Chris for your patience and Python guru help. :)

Continue reading »

python stuff

from vegaseat at DaniWeb.Com.

Python Code Snippet (Toggle Plain Text) # handling date/time data # Python23 tested vegaseat 3/6/2005

import time

print "List the functions within module time:"
for funk in dir(time):
print funk

print time.time(), "seconds since 1/1/1970 00:00:00"
print time …

Continue reading »

Debugging python...

To debug a specific python script, start by inserting the following in to your .py file:

import pdb; pdb.set_trace()

These commands allow you to step through the code from the point of where pdb.set_trace() is placed in your script.

p \<object> - print the content of an …

Continue reading »

Merge lists in to dictionary based on key in Python

i've been learning bits of python here and there for work and for play and I came across a simple solution to a simple problem I had to solve in python.
There are some things in python that once you realize how things work you think "that is so simple …

Continue reading »