Am 25.10.2012 11:11, schrieb Andy Smith:> New question #212270 on python-mode.el:
> https://answers.launchpad.net/python-mode/+question/212270
>
>
> Hi All,
>
> On windows I've had to replace line 9274...
>
> (py-execute-directory (or (ignore-errors (file-name-directory (file-remote-p (buffer-file-name) 'localname)))(getenv "WORKON_HOME")(getenv "HOME")))
>
> with ...
>
> (py-execute-directory (or (file-name-directory buffer-file-name)(getenv "WORKON_HOME")(getenv "HOME")))
>
> i.e. the (ignore-errors .....) clause has failed on me.
>
> Without this modification I get....
>>>> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "c:/cygwin/tmp/python-6060ECQ.py", line 3, in <module>
> import os; os.chdir("C:\home\andy")
> WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect: 'C:\\home\x07ndy'
>
> I'm not an elisp guru but I guess the ignore-errors clause is failing, and the 'or' is moving on to(getenv "HOME"), and some wierd escaping is happening on my home directory - "C:\home\andy".
>
> I don't know why (buffer-file-name) is in paren. It would make sense if if buffer-file-name is a function , but buffer-file-name is a variable so doesn't need to be wrapped in parens???!! Given that, i can't see how that clause can ever work.
>
> Take with a pinch of salt though - like i say I'm not an elisp guru by any stretch.
>
> Cheers,
>
> A.
>
Hi,
seems you are using an older version.
May you check out the current trunk and try again?
Thanks,
Andreas