Tag Archives: Python

Python – Abstract Function class

Python is great. It’s dynamic, it’s flexible, and best of all, for almost all major datatypes, there’s an associated abstract class from which you can over-ride and build your own object out of.

Of course, Python doesn’t treat functions in…

Posted in Programming, Python, Snippets | Tagged , , , , , , , , , , , , | Leave a comment

Chroma-Hash implementation in Python

I’ve just read an experiment by mattt.me about creating a multi-colored area beside the password area in order to let people who have extremely long passwords know that their passwords matches.

http://mattt.me/2009/07/chroma-hash-a-belated-introduction/

Personally I thought that this is an extremely…

Posted in Programming, Python, Snippets | Tagged , , , , , , , , , , , , | Leave a comment

Auto-restart in (Python) and subprocess.Popen goodness

This is an auto-restart script for Orbited, but it can be modified to be used with other apps. This is presuming that there’s only one instance with that name running.

Basically, this script takes into account the fact that if…

Posted in Programming, Python, Snippets | Tagged , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Import Antigravity (Oh snap, we’re flying)

I’ve just installed Python 3.0 and while in my geeky pursuit for perfection by sifting through the new files, I came across antigravity.py within the python directory.

import webbrowser
webbrowser.open("http://xkcd.com/353/")

So now, if you type…

Posted in Programming, Python, Snippets | Tagged , , , , , | 1 Comment