Tue 24th Jul 2007
Posted late evening, filed under
Python.
Okay, I think I’ve found an appscript bug.
If you attempt to connect to a networked machine, such as doing:
>>> from appscript import *
>>> it = app(url=”eppc://user@machine.local/iTunes”)
>>> it.activate()
Which works fine if you have a password, fails if there is no password. And the error reported is:
RuntimeError: Can’t get terminology for application (aem.Application(url=’eppc://user@machine.local/iTunes’)): CommandError -128: userCanceledErr
Just because I haven’t put in a password, doesn’t mean I have cancelled the operation.
I’m still working on a fix to get it to work.
Tue 24th Jul 2007
Posted late evening, filed under
Asides ,
Rants and Raves.
I hate that when I type in a query to Google, like:
appscript network
It returns a heap of hits for AppleScript network.
Fuck you Google. If I meant AppleScript, I’d fucking write AppleScript!
Tue 24th Jul 2007
Posted in the evening, filed under
Programming.
I use ecto for posting, which is pretty cool.
I’d like to be able to have it so that it creates links automatically from URLs that I happen to write in.
Thus http://www.google.com automatically becomes <a href=”http://www.google.com”>http://www.google.com</a> enabling me to just enter a URL in a post.
The best method for doing this would have to be regex:
((?<!(<a href="))(?<!(>))((https?|ftp://)|((mailto|aim|svn):)|(file:///)|((?<!://)www\.))[a-zA-Z0-9_$!&%?,#@'/.*+;:=~-]+\w)\.{0}
This will match a URL that isn’t already in an href link. Took me ages to work out.
This will also match www.google.com. And not the dot at the end.
I’m still working on code that will create links. I think a seperate regex for each type of URL might be useful.
Hamoa Beach • Gomez • How We Operate
Tue 24th Jul 2007
Posted early evening, filed under
Python ,
ecto.
I came across a strange issue today. I have written a script that adds acronym tags to a post created in ecto, and another that adds the currently playing iTunes track, as nice links to iTMS.
However, the problem that arose is that the script wouldn’t run. I had the shebang line, and everything, but no joy.
Then I noticed that I have upgraded my python installation to 2.5, but for some reason the /usr/bin/python was still pointed at 2.3 - but my interpreter run from the bash shell, or from Komodo was 2.5. This itself wouldn’t be too much of an issue, except I was using appscript, and I had only installed appscript into the 2.5 Python installation library.
So, it was failing (way too silently, for my liking), and I couldn’t tell why.
All fixed now, though.
Fly Me Away • Supernature • Goldfrapp
Tue 24th Jul 2007
Posted early evening, filed under
Programming.
I’d love to move to Git, even though I’ve really only just started using svn. There’s only one thing holding me back: the fact that all of the tools I use support Subversion, but not Git.
I’d probably settle for just one non-CLI tool, like SCPlugin. I’ve even downloaded the source code, and I will have a bit of a look at how that works, and if it is possible to translate that into Git-speak.
I really like how Komodo and Xcode will also display the SCM status of a file - it’s just those little extra features that make it kinda easy to remember to commit changes from time to time.