[Tutor] prenting a line form appearing in log file

anatta anatta kumarmysore at hotmail.com
Thu Jan 5 08:01:49 EST 2017


Dear Tutors,

Thanks in advance for the help.

anatta.

+

I have created a log file, using 'logging' module, which records items of my interest after the execution of the program.  The program in the beginning asks for name of the person who runs the program, as below:

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.

+++



More information about the Tutor mailing list