Solved

python shebang line

Posted on 2004-08-06
2
1,036 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
2 Comments
 
LVL 17

Expert Comment

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

Accepted Solution

by:
rjkimble earned 500 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Which best Pygame version for Python on OS X 10.9.5 ? 3 84
python question 5 76
python sqlite question 11 46
yara deployment 8 62
Plenty of writing has gone on the web trying to compare Python with other competitive programming languages and vice versa. However, not much has been put into a wholistic perspective. This article should help you decide whether to adopt Python as a…
Installing Python 2.7.3 version on Windows operating system For installing Python first we need to download Python's latest version from URL" www.python.org " You can also get information on Python scripting language from the above mentioned we…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

825 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