Monday, October 19, 2009

Simple python class

Teaching myself the basics of python. With all the info on the net its hard to find a simple example that demonstrates a python class. This little bit of code demonstrates a class in a simple to understand way.


class myclass:
def __init__(self):
print "Constructor init - how we create ourselves"
def __str__(self):
return "This is how we print ourselves"
def __del__(self):
print "Destructor - how we delete ourselves"

x=myclass()
print x

Thursday, October 8, 2009

Python AJAX

If you want to start clean and develop new modern web apps take a look at pyjamas. It's a different way of creating applications. The simplest explanation is that it's a python to html + javascript compiler. You need to actually download and make a few test programs. Really impressive!