Fix some coding styles

These commits fix some coding styles to follow the PEP 8 style guide and other conventions.
If you don't like lots of  small commits, I'll squash these commits into a commit and submit a pull request again.

By the way, are you planning to support Python 3?
I want to use this library with Python 3 and the development branch of pygraphviz seems to be moving toward the support of Python 3. https://github.com/pygraphviz/pygraphviz/commits/master