I have a script that i've been using on my laptop for stripping out the time stamps in chat logs. I'm wondering how I need to tweak it to use it with Pythonista. Here it is now:
with open('log.txt', 'r') as logfile:
list_of_lines = logfile.readlines()
list_without_timestamp = [line[21:] for line in list_of_lines]
Put back together:
log_string = ''.join(list_without_timestamp)
Write to new file:
with open('log_without_timestamp.txt', 'w') as new_logfile:
My question is, where do i need to put my log.txt file to let Pythonista see it? I tried creating an empty file and pasting in my text and renaming it log.txt but that didn't seem to work.
If I can't do that can I use <code>clipboard.get()</code> to import the text via the clipboard?
Any help much appreciated.