sounds like it. vi sock.py shows '$' at the end of each line.
however when i went to a unix machine and recreated the file, the
problem went away.
thanks for all the help
regards
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> the script i have sock.py runs if i say something like :
>
> python sock.py
>
> but ./sock.py results in a :bad interpreter error
> how do i troubleshoot something like this?
sounds like you've been editting the script on a windows machine, and
say something like :
>
> python sock.py
>
> but ./sock.py results in a :bad interpreter error
> how do i troubleshoot something like this?
>
Check the first line of your script - it should set the path to the Python
interpreter. It should look something like this:
#!/usr/bin/python
or
ething like :
>
> python sock.py
>
> but ./sock.py results in a :bad interpreter error
> how do i troubleshoot something like this?
>
> regards
>
What does the first line of your script look like? It needs to be pointing
to the python interpreter binary, which you can
say something like :
>
> python sock.py
>
> but ./sock.py results in a :bad interpreter error
> how do i troubleshoot something like this?
You probably have Windows-style line endings in the file. The kernel
sees the ^M at the end of the line and gets all confused.
--
Craig Ringer
--
http:/
I have seen some previous messages about such a problem. I have this
problem but it is not clear what the solution really was.
I am running FC2, python 2.3.3
the script i have sock.py runs if i say something like :
python sock.py
but ./sock.py results in a :bad interpreter error
how do i