[Tutor] prenting a line form appearing in log file

Alan Gauld alan.gauld at yahoo.co.uk
Thu Jan 5 11:27:55 EST 2017

On 05/01/17 13:01, anatta anatta wrote:

> I have created a log file, using 'logging' module, 

> name = raw_input ("Please enter your name.")
> print 'Hi ', name, 'Please go ahead and press enter to transfer files'
> The log file records the variable 'name' in the log file at the 
> right location as I have coded.  So far so good.
> However the log file also records the following statements 
> at the end of the log file.
> Hi 'name', Please go ahead and transfer files
> How can I prevent this line from appearing at the end of the logfile.

Its hard to tell what's happening without seeing your code.
If it is very long try creating a shirter example that
exhibits the same behaviour and post that. (Doing so may
even show you the error.)

But with the limited information you've given us, we are just
making wild guesses.

Alan G
Author of the Learn to Program web site
Follow my photo-blog on Flickr at:

More information about the Tutor mailing list