1 |
Greg Lindstrom writes: |
2 |
|
3 |
> I am programming Python (2.4.1) scripts to run on our Gentoo boxes and |
4 |
> am having a bit of trouble I was hoping you could help me with. My |
5 |
> file, hello.py looks like this: |
6 |
> |
7 |
> #!/usr/bin/python |
8 |
> print 'hello, python' |
9 |
> |
10 |
> I add execute permission to the file and try to run it as follows: |
11 |
> |
12 |
> myprompt $ ./hello.py |
13 |
> |
14 |
> and get |
15 |
> |
16 |
> -bash: ./hello.py: /usr/bin/env: bad interpreter: Permission denied |
17 |
|
18 |
is is possible that you saved the text file in DOS format, with CR-LF |
19 |
endings instead of LF only? |
20 |
|
21 |
If "od -t x2 hello.py" shows 0a0d sequences, this is the case. You could |
22 |
use dos2unix to convert. |
23 |
|
24 |
Just guessing, but I sometimes got similar errors in such cases. |
25 |
|
26 |
Alex |
27 |
-- |
28 |
gentoo-user@g.o mailing list |