On 3 Mar 2009, at 17:33, Claus wrote:
I have some python code that runs fine if I execute it from the terminal. If I run it from within textmat (cmd-R) I get this error:
IOError: 2, No such file or directory [...] I guess it has to do with the pytz module?
It looks like a run-time error from the script trying to open a time zone file or similar.
But why does it run on the terminal? Can there be a difference between running python on the terminal vs. from within TextMate?
Yes, the environments (shown via the ‘env’ command) can differ in many ways, in your case it could be that TZ is setup differently for the Terminal than TextMate, or maybe it is related to the LC variables…
Can you provide a small example which reproduce the problem?