I've gotten a little bit furter in understanding the general workings of python, and currently I'm fidgeting with classes and objects. I was thinking of the possibilities of having a program with a whole bunch of user defined classes that the user can use (hey, almost a repetitive aliteration there...) interactively.
So if I have a while loop that continously brings back a starting prompt, the user can write the class name followd by a suitable string or something, looking something like this:
new input> add H.Umbug
H Umbug just joined.
I've managed to get this version working, which I think gives an idea of what I'm after:
class add: def __init__(self, name): self.name = name def Hi(self): print self.name, "just joined" p = add(raw_input("add ")) p.Hi()
However, as you can see this doesn't quite land where I want to. Any tips on where to start, if this is even possible, would be great!