Jens a écrit :
> On 19 Nov., 19:48, [EMAIL PROTECTED] wrote:
> 
>>Is it possible to display messages in the python shell?  I want to
>>display error messages based on parameters in my scripts to the
>>users.  Is there another way to display messages other than log
>>files?  Thanks.
>>
>>Kou
> 
> 
> What about using print? For example:
> 
> print "This is a message."

print writes to stdout - which is for normal program outputs. wrt/ 
errors, you want stderr, ie:

import sys

print >> sys.sdterr, "this is an error message"

HTH
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to