Embedding python

vincent wehren vincent at visualtrans.de
Thu Aug 5 11:05:17 CEST 2004

Jon Kinsey wrote:
> I've embedded python in a program, am I right in thinking python has
> to be installed on a machine for my program to work?

Not entirely true: as long as python23.dll (or whatever version you are 
using) is available to your program, your program will work. (So you 
need to distribute at least this dll with your program). However, this 
only allows you to use any built-in functionality of python. Once you 
want to import modules from the standard library or from other packages, 
you will need to have them installed. The installed version of (the) 
python (library/package) has to be of/for the same (major) version as 
the Python version your program uses. Which brings you to your next 

> If so how can I find out if python is installed/what version is
> installed - programatically and cross platform.
> Jon

If you need more than built-ins, you may want to consider distributing 
your own Python (cf. applications such as Paint Shop Pro 8.x, 
OpenOffice.org, or Zope on Windows ) along with your application and 
make it live in a sub directory. By tweaking the right environment 
variables from within your app, you'll be sure to get the "right Python" 
- independent of the fact whether or not the ("right") Python is 
installed or not.

Vincent Wehren

More information about the Python-list mailing list