Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

python shebang line

Posted on 2004-08-06
2
Medium Priority
?
1,098 Views
Last Modified: 2008-01-09
I want to run a simple Python script, but I keep getting bad interpreter.  I've tried this:

#!/usr/bin
python mypythonscript

...as well as this...
#!/usr/bin
python mypythonscript

...as well as this...

#!/System/Library/Frameworks/Python.framework/Versions/2.3/bin/python
python mypythonscript

What am I missing?

Thanks
je

0
Comment
Question by:jesterepsilon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Expert Comment

by:ramrom
ID: 11740496
Platform?
Evidence?
Symptoms?
0
 
LVL 9

Accepted Solution

by:
rjkimble earned 1500 total points
ID: 11740557
The shebang line is the first line in the script. It should be something like this:

#!/usr/bin/python

or this:

#!/usr/bin/env python

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here I am using Python IDLE(GUI) to write a simple program and save it, so that we can just execute it in future. Because when we write any program and exit from Python then program that we have written will be lost. So for not losing our program we…
Sequence is something that used to store data in it in very simple words. Let us just create a list first. To create a list first of all we need to give a name to our list which I have taken as “COURSE” followed by equals sign and finally enclosed …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question