<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16890" name=GENERATOR></HEAD>
<BODY><!-- Converted from text/plain format -->
<P><BR><FONT face=Arial>Hi,<BR><BR>I wanted to make a python byte-code file 
executable, expecting to be able to run it without specifying "python" on the 
(Linux bash) command line.<BR><BR>So, I wrote the following:<BR><BR><FONT 
face=Courier>[root@VMLinux1 python]# cat test_pyc.py<BR><FONT 
color=#0000ff>#!/usr/bin/env python<BR><BR>print 
"hello"<BR></FONT>[root@VMLinux1 python]#<BR></FONT><BR>and made its pyc file 
executable:<BR><BR><FONT face=Courier>[root@VMLinux1 python]# ls -ls 
test_pyc.pyc<BR>4 -rwxr-xr-x  1 root root 106 Jul 29 14:22 
test_pyc.pyc<BR>[root@VMLinux1 python]#<BR></FONT><BR>So, I see:<BR><BR><FONT 
face=Courier>[root@VMLinux1 python]# file test_pyc.py*<BR>test_pyc.py:  a 
python script text executable<BR>test_pyc.pyc: python 2.3 
byte-compiled<BR>[root@VMLinux1 python]#<BR></FONT><BR>If I try to do the 
following, no problem:<BR><BR><FONT face=Courier>[root@VMLinux1 python]# python 
test_pyc.pyc<BR>hello<BR>[root@VMLinux1 python]#<BR></FONT><BR>However, the 
following fails:<BR><BR><FONT face=Courier>[root@VMLinux1 python]# 
./test_pyc.pyc<BR><FONT color=#ff0000>-bash: ./test_pyc.pyc: cannot execute 
binary file<BR></FONT>[root@VMLinux1 python]#<BR></FONT><BR>Is there a way to 
run a pyc file without specifying the python path 
?<BR><BR>Bye,<BR>Ron.</FONT><FONT face=Arial> </FONT></P></BODY></HTML>