Login Register






Python Log filter_list
Author
Message
Python Log #1
I was trying to write a simple log for a software I'm working on and I came across an error. I couldn't find out what was wrong so I thought someone else might be able to...
Code:
import getpass pc_user = getpass.getuser() target_log = 'C:\Users\' + pc_user + '\Desktop\log.txt' with open(target_log, 'a') as the_file: the_file.write('Hello\n')
Thanks!:epic:

Reply