Solved

python shebang line

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
looping 11 39
How to get all the API from website? 11 129
Python mysql Insert data error 3 108
Powershell script to send email via Gmail if file is older than specified time 9 169
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…
Variable is a place holder or reserved memory locations to store any value. Which means whenever we create a variable, indirectly we are reserving some space in the memory. The interpreter assigns or allocates some space in the memory based on the d…
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 …
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…

726 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