ucs2 and ucs4 python

Chris Angelico rosuav at gmail.com
Wed May 16 05:05:23 EDT 2012


On Wed, May 16, 2012 at 6:36 PM, zayatzz <alan.kesselmann at gmail.com> wrote:
> There is one problem though...
>
> when i start script with shebang like
> #!/opt/bin/python
>
> and then try to run the script i get:
>
> /opt/bin/python^M: bad interpreter: No such file or directory

You have a Windows end-of-line \r\n instead of a Unix end-of-line \n -
how are you editing the files? If nothing else, run the script through
dos2unix or equivalent before executing.

ChrisA



More information about the Python-list mailing list