how can i make a executable program with a python2's script

Michael Stenner mstenner at phy.duke.edu
Sat Sep 7 00:23:12 CEST 2002


On Fri, Sep 06, 2002 at 04:57:19PM -0500, Stephen Boulet wrote:
> You can put
> 
>     #/usr/bin/env python
> 
> at the top of the file and do a chmod +x file. Is this the answer to the 
> right question?

Although since you're trying to use python 2.2.1 on a RHL 7.2 box, you
may need to make that

 #!/usr/bin/env python2

Otherwise, you'll get python 1.5.2, which can lead to confusing errors.

					-Michael
> jgm2163 wrote:
> > os     :RedHat 7.2
> > Python :Python2.2.1
> > 
> > now,i had writen a python's script (extend with .py)
> > how can i make a executable program on RedHat 7.2?
> 
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list

-- 
  Michael Stenner                       Office Phone: 919-660-2513
  Duke University, Dept. of Physics       mstenner at phy.duke.edu
  Box 90305, Durham N.C. 27708-0305




More information about the Python-list mailing list