[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Comments System
andrew baker wrote:
I just created a logEvent method in my file_io lib, and I call it via if
world.DEBUG: logEvent("className: %s" % (any important data)). Logs it
to a file, so it's faster than printing to a terminal.
Your method doesn't sound odd, though I'm wondering why you're passing
'what'. I'd imagine that anything useful would be an attribute of self.
I do that so that in the midst of a function, I can say things like:
self.Comment("Got to this point; current status of local variable spam
is: "+str(spam))
And then turn off the comments all at once by saying,
"my_object.comments = False".
Kris