conditional print
Miki Tebeka
mtebeka at iil.intel.com
Thu Oct 12 05:22:16 EDT 2000
Hello All,
Is there something like the following in the regular python
libraries/languge?
class DBPrompt:
"""Prompt message according to debug level"""
def __init__(self, trashhold = 0):
self._trashhold = trashhold
def trashhold(self):
return self._trashhold
def set_trashhold(self, trashhold):
self._trashhold = trashhold
def prompt(self, msg, level = 0):
if (level >= self._trashhold):
print msg
Bye.
------------------------------------------------------------------------------
Smile, damn it, smile.
lambda msg: {
'name' : 'Miki Tebeka',
'email' : 'tebeka at lycosmail.com',
'homepage' : 'www.tebeka.freeservers.com',
'quote' : "I don't suffer from insanity, I enjoy every minute of it."
}[msg]
More information about the Python-list
mailing list