faqts : Computers : Programming : Languages : Python : Common Problems

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 4 people (75%) answered Yes
Recently 1 of 2 people (50%) answered Yes

Entry

Can I run python code with files that don't end with the python extensions(.py and others)?

Jul 25th, 2000 04:27
Steve Purcell, unknown unknown, Steve Purcell


Yes. Simply 'chmod +x scriptname' and make the first line of the script 
read '#!/usr/bin/env python'.