Hashbang error

Rebelo puntabluda at gmail.com
Tue Jun 1 07:19:37 EDT 2010


On 06/01/2010 12:56 PM, pradeepbpin wrote:
> I use gVim as an editor to create python scripts on a windows machine.
> To run the same script on my ubuntu machine, I added a hashbang line
> to the script. Now when I run this script from command line of ubuntu,
> I get a bad interpreter error, like below
>
> /usr/bin/python^M: bad interpreter: No such file or directory
>
> This, I understand, is due to the interpretation of newline character
> at the end of the hashbang.
>
> I have checked and found out that this does not happen if I create the
> script in Ubuntu with gVim.
>
> Now, how can I avoid this error when I create the script on a windows
> machine?


check if there is an option like in Geany to select encoding and line 
endings



More information about the Python-list mailing list