conditional print
Miki Tebeka
mtebeka at iil.intel.com
Thu Oct 12 05:22:16 EDT 2000
More information about the Python-list mailing list
Thu Oct 12 05:22:16 EDT 2000
- Previous message (by thread): Newbie: How do I implement an 2 element integer array in Python.?
- Next message (by thread): Student practical training
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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]
- Previous message (by thread): Newbie: How do I implement an 2 element integer array in Python.?
- Next message (by thread): Student practical training
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list