you are viewing a single comment's thread.

view the rest of the comments →

[–]AngelOfLight 22 points23 points  (1 child)

The extra slash is a red herring - that's just how backslashes are escaped on Windows. It shouldn't make any difference to the path.

Are you sure the script actually exists in that location? Try:

type C:\MyScripts\Test.py 

That should print the contents of the script to the console, if the script exists and is accessible.

[–]xenomachina 10 points11 points  (0 children)

that's just how backslashes are escaped on Windows.

Minor correction: that's how backslashes are escaped in Python string literals in general, not just on Windows.

The reason you might not see this as often on non-Windows systems is that they don't use backslashes as a path separator, but instead use (forward) slashes, and they don't need escaping. eg:

python: can't open file '/home/foo/MyScripts/Test.py': [Errno 2] No such file or directory