[Tutor] Making executable
alan.gauld@bt.com
alan.gauld@bt.com
Thu, 21 Mar 2002 10:40:44 -0000
------_=_NextPart_001_01C1D0C4.DABC1050
Content-type: text/plain; charset="iso-8859-1"
> I'm sure this is an easy question, so I came to the experts. I'd like to
know
> how to make a program (or script) executable for people that do not have
> Python installed on their machine?
To make the script executable is simply a matter of changing
file permissions. To make it execute requires Python to be
on the machine.
Assuming you are on Windows (this only seems to be an issue for
Windows users for some strange reason, despite the popularity
of VB) there are a couple of tools that can package up your
script witrh a cut down python interpreter installation so
they look like an executable (.exe) file.
One is py2exe and the other is Gordon McMillan's installer.
Search for both on Google or at ActiveState and you should
find them easily enough.
The real question is why you need to do this?
Why not just install Python with your script.
The py2exe route means they potentially wind up with multiple
copies of Python installed whereas installing python per se
means subsequent program uploads are tiny. Thats why VB
requires a huge VBRUN.DLL file be installed but then all
other VB programs are small(only a few kilobytes usually)
HTH
Alan G.
------_=_NextPart_001_01C1D0C4.DABC1050
Content-type: text/html; charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial><FONT size=2><SPAN class=760214210-21032002><FONT
face="Courier New" color=#0000ff>> </FONT></SPAN>I'm sure this is an
easy question, so I came to the experts. I'd like to know <SPAN
class=760214210-21032002><FONT face="Courier New"
color=#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=760214210-21032002><FONT
face="Courier New" color=#0000ff>> </FONT> </SPAN>how to make a program
(or script) executable for people that do not have <SPAN
class=760214210-21032002><FONT face="Courier New"
color=#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=760214210-21032002><FONT
face="Courier New" color=#0000ff>> </FONT> </SPAN>Python installed on
their machine?<SPAN class=760214210-21032002><FONT face="Courier New"
color=#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=760214210-21032002></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=760214210-21032002><FONT
face="Courier New" color=#0000ff>To make the script executable is simply a
matter of changing </FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=760214210-21032002><FONT
face="Courier New" color=#0000ff>file permissions. To make it execute requires
Python to be </FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=760214210-21032002><FONT
face="Courier New" color=#0000ff>on the
machine.</FONT> </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>Assuming you are on Windows (this only seems to be an
issue for </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>Windows users for some strange reason, despite the
popularity </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>of VB) there are a couple of tools that can package up
your </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>script witrh a cut down python interpreter installation
so </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>they look like an executable (.exe)
file.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>One is py2exe and the other is Gordon McMillan's
installer.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>Search for both on Google or at ActiveState and you
should </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>find them easily enough. </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>The real question is why you need
</SPAN></FONT></FONT><FONT face=Arial><FONT face="Courier New" color=#0000ff
size=2><SPAN class=760214210-21032002>to do this? </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>Why not just install Python with your
script.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>The py2exe route means they potentially wind up with
multiple </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>copies of Python installed whereas installing python
per se </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>means subsequent program uploads are tiny. Thats why VB
</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>requires a huge VBRUN.DLL file be installed but then
all </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>other VB programs are small(only a few kilobytes
usually)</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002>HTH</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT face="Courier New" color=#0000ff size=2><SPAN
class=760214210-21032002></SPAN></FONT></FONT><FONT face="Courier New"><FONT
color=#0000ff><FONT size=2>A<SPAN class=760214210-21032002>lan
G. </SPAN></FONT></FONT></FONT></DIV></BODY></HTML>
------_=_NextPart_001_01C1D0C4.DABC1050--