It should be something like:
class Person:
def setavalue(self, name):
self.myname = name
def printaname(self):
print "Name", self.myname
def main():
p = Person()
p.setavalue("harry")
p.printaname()