Maintaining scripts as their underpinings change (Not what I wanted to do today, but I have Eric back on the workstation now)


I use a script I wrote a while ago that produces Eric3 project files from checked-out SVN/CVS directories. It lets me use the command-line SVN/CVS operations (which I find more convenient than the Eric operations[1]) then regenerate the project file. The SVN operations were provided by the pysvn wrapper... and thats where the problem was.

As mentioned yesterday, I wasn't able to get pysvn compiled and working under Python 2.5. I spent a bit of time this evening looking at the pysvn code, then at whether running ctypes over the header would be a reasonable exercise. It looks like it would be fairly straightforward, but I stopped myself from that particular path of madness.

Instead, when I looked at the usage of pysvn, it turns out I only use one function, the "ls" method... again, I could write a ctypes wrapper in 20 or 30 minutes, but why not just use os.popen() with "svn ls %(path)s" and move on to other tasks? So, pysvn is no longer part of the toolchain and one less piece of software I need to have compiled to work efficiently on a machine.

Of course, I spent almost 2 hours on this (and tweaking the script to work with the latest version of Eric and to make all of the code "source" instead of dumping the HTML and KID files into "other"). Not really a good use of time on a tight deadline, but I obviously needed a bit of a mental break from the main project.

[1]That's a bit of an understatement, I spend 5 or 10 minutes every time I try to use the Eric operations just trying the possible variations, getting kicked out for having mis-specified a URL and having to re-specify from scratch.

Comments

Comments are closed.

Pingbacks

Pingbacks are closed.