Simple Python App Server

tom.purl tom.purl at gmail.com
Fri Aug 18 11:43:13 EDT 2006


I use the pyGTD script to manage my todo lists and such.  From Vim, I
shell out a call to the gtd.py script, which updates my todo.txt file
after update one of the related pyGTD files.  Since I make a lot of
updates to the related pyGTD files, I execute the gtd.py script dozens
of times a day.

The problem is that this script can be a little slow.  It usually takes
at least 5 seconds to run, time that I can't use Vim (and running it in
the background from Vim isn't a usable option for me).  I tried making
it run faster by adding the following lines at the top of the __main__
method:

    import psyco
    psyco.full()

This change, however, didn't shave off any noticeable amount of time.

I was wondering if there was a way in which I could run the python
interpreter all of the time so that I wouldn't have to invoke it each
time that I want to run the gtd.py script.  Is there a way to do this?o

Thanks in advance!

Tom Purl




More information about the Python-list mailing list