[Tutor] running programs

alan.gauld@bt.com alan.gauld@bt.com
Wed, 10 Oct 2001 10:39:04 +0100


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1516F.66A343C0
Content-Type: text/plain;
	charset="iso-8859-1"

    I am learning to program, I have chosen Python as my first language to
learn.  My question is, I have written some command line programs (small
programs) and I would like to run them on a different computer.   

Well done, thats the hardest bit over :-)
 

 How can I do this without installing Python on the second computer?   
 

There are a few packages around that can do this.
py2exe seems to be the favourite but Gordon McMillan 
also has an installer program on the ActiveState 
site somewhere.
 
However first to clear up some common misconceptions:
 

 Basically how do you package programs to run on other computers as
"software" without actually installing Python to run them?   
 

You can't. All the above solutions do is pack up the smallest bit of python
needed to run your program and combine it with your program as a single
unit.
 
This is true of every program even C++ ones.
If you delete the MFC DLL on your windows PC you will 
find that virtually nothing works! Similarly on Unix 
if you delete the libc files nothing will work. This 
is because every program is built to use a standard 
runtime environment, its just that some of these 
environments are installed by default on the operating system while others -
like Python - must be installed later.

 
 
 For instance, if I wrote a Python program with Tkinter how would that
program be packaged to be installed and run on a computer?
 
Thanks,
 
Chris Nally
Louisville, Kentucky


------_=_NextPart_001_01C1516F.66A343C0
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.00.3013.2600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<BLOCKQUOTE 
style="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">
  <DIV><FONT size=2>&nbsp;&nbsp;&nbsp; I am learning to program, I have chosen 
  Python as my first language to learn.&nbsp; My question is, I have written 
  some command line programs (small programs) and I would like to run them on a 
  different computer.&nbsp;&nbsp;<SPAN class=360153309-10102001><FONT 
  color=#0000ff face="Courier New">&nbsp;</FONT></SPAN></FONT></DIV></BLOCKQUOTE>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001>Well done, thats the hardest bit over 
:-)</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001></SPAN></FONT>&nbsp;</DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">
  <DIV><FONT size=2><SPAN class=360153309-10102001>&nbsp;</SPAN>How can I do 
  this without installing Python on the second computer?&nbsp;&nbsp;<SPAN 
  class=360153309-10102001><FONT color=#0000ff 
  face="Courier New">&nbsp;</FONT></SPAN></FONT></DIV>
  <DIV><FONT size=2><SPAN 
class=360153309-10102001></SPAN></FONT>&nbsp;</DIV></BLOCKQUOTE>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001>There are a few packages around that can do 
this.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001>py2exe seems to be the favourite but Gordon McMillan 
</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001>also has an installer program on the ActiveState 
</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001>site somewhere.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001>However first to clear up some common 
misconceptions:</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001></SPAN></FONT>&nbsp;</DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">
  <DIV><FONT size=2><SPAN class=360153309-10102001>&nbsp;</SPAN>Basically how do 
  you package programs to run on other computers as "software" without actually 
  installing Python to run them?&nbsp;&nbsp;<SPAN class=360153309-10102001><FONT 
  color=#0000ff face="Courier New">&nbsp;</FONT></SPAN></FONT></DIV>
  <DIV><FONT size=2><SPAN 
class=360153309-10102001></SPAN></FONT>&nbsp;</DIV></BLOCKQUOTE>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001>You can't. All the above solutions do is pack up the 
smallest bit of python needed to run your program and combine it with your 
program as a single unit.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001>This is true of every program even C++ 
ones.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001>If you delete the MFC DLL on your windows PC you will 
</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001>find that virtually nothing works! Similarly on Unix 
</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001>if you delete the libc files nothing will work. This 
</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001>is because every program is built to use a standard 
</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001>runtime environment, its just that some of these 
</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN 
class=360153309-10102001>environments are installed by default on the operating 
system while others - like Python - must be installed later.</SPAN></FONT></DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">
  <DIV><FONT size=2><SPAN class=360153309-10102001></SPAN></FONT>&nbsp;</DIV>
  <DIV><FONT size=2><SPAN class=360153309-10102001></SPAN></FONT>&nbsp;</DIV>
  <DIV><FONT size=2><SPAN class=360153309-10102001>&nbsp;</SPAN>For instance, if 
  I wrote a Python program with Tkinter how would that program be packaged to be 
  installed and run on a computer?</FONT></DIV>
  <DIV><FONT size=2></FONT>&nbsp;</DIV>
  <DIV><FONT size=2>Thanks,</FONT></DIV>
  <DIV><FONT size=2></FONT>&nbsp;</DIV>
  <DIV><FONT size=2>Chris Nally</FONT></DIV>
  <DIV><FONT size=2>Louisville, Kentucky</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C1516F.66A343C0--