Solved

python shebang line

Posted on 2004-08-06
2
1,014 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The really strange introduction Once upon a time there were individuals who intentionally put the grass seeds to the soil with anticipation of solving their nutrition problems. Or they maybe only played with seeds and noticed what happened... Som…
A set of related code is known to be a Module, it helps us to organize our code logically which is much easier for us to understand and use it. Module is an object with arbitrarily named attributes which can be used in binding and referencing. …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now