• DKatz225

    Pretty excited for this. I noticed some of the workflows on your github account the other day and got curious. It all makes sense now.

    posted in Pythonista read more
  • DKatz225

    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:

    <PRE>

    Read File:

    with open('log.txt', 'r') as logfile:
    list_of_lines = logfile.readlines()

    Remove timestamp:

    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:
    new_logfile.write(log_string)
    </PRE>

    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.

    Thanks!

    posted in Pythonista read more
  • DKatz225

    I'm having trouble getting this to work for some reason. I get an 'invalid syntax' error on line 16 where all the header info is. Any idea what could be causing this?

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!