Pythonwin (win32all build 148) on Python 2.2.1 on Win2K, bogus syntax e

Steve Holden sholden at holdenweb.com
Sun Sep 29 12:34:26 CEST 2002


"A. Dimsdale and A. Moser" <fetus at AUTO> wrote ...
> A. Dimsdale Fetus A. Moser <fetus at AUTO> writes:
>
> >"Neil Hodgson" <nhodgson at bigpond.net.au> writes:
>
> >>Aaron Dimsdale and Alex Moser:
>
> >>> Pythonwin barfed on the quote marks marked by carets, returning:
"Failed
> >>to run script -
> >>> syntax error - invalid syntax".
>
> >>   Try turning on View | End-of-line markers to see if you have
non-standard
> >>line endings such as pure carriage returns, which cause just this sort
of
> >>error. On Windows, you want line endings to be carriage return + line
feed.
>
> >>   Neil
>
> [snip]
>
> Well, I went in and manually edited the EOLs on every code line in the
file.
> (Fun fun fun.) As it turns out, the cause of the problem is likely the
> difference between DOS-style and Unix-style EOLs. Alex and I jointly own
an
> account on my Linux box at home, where we keep the latest version of the
script.
> Alex does most of the coding on our script, and I just do other stuff like
> looking over the code when it slaps him, adding fixes and/or minor
features,
> etc. Well, since he does most of the coding, he had the script on his work
comp
> when we were at work on Tuesday, and I had him upload it to my Linux box
so I
> could grab it from my work box by FTP, and through the Win-to-Linux-to-Win
> transfer the EOLs apparently got funkified.
> Thanks again for the EOL tip.
>
For future reference, make sure you use ASCII mode for FTP transfers (of
text files, nach). This gives the receiving system the chance to modify the
line endings on the received file.

regards
-----------------------------------------------------------------------
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/
Previous .sig file retired to                    www.homeforoldsigs.com
-----------------------------------------------------------------------






More information about the Python-list mailing list