using a private embedded python

Howard Lightstone howard at eegsoftware.com
Tue Apr 1 01:20:42 EST 2003


"Greg Ewing (using news.cis.dfn.de)" <ckea25d02 at sneakemail.com> wrote in
news:b6aktn$3br9c$1 at ID-169208.news.dfncis.de: 

> Bryan wrote:
>> my
>> concern is what you mentioned...,  that other company products will
>> want to use python or the python scripts i'm executing will want a
>> module i haven't frozen.   so this option unfortunately seems too
>> restrictive. 
> 
> There are tools for Windows that will package up an application
> together with its own private interpreter into a self-unpacking
> archive. Usually they only include the modules used by that
> application, however. If your application is intended to be
> scripted in Python by the end user, you'd want to include all of
> the standard library. I don't know whether these tools have an
> option for that, possibly they do, you'd have to investigate.
> 
[snip]
 
> > can you have two separate
> > versions of 2.2.2 on the machine at the same time?  on windows? on
> > unix? 
> 
> On Unix, yes, certainly, as long as you take care to install
> them in different directories.
> 
> On Windows, you can certainly have *different* version numbers
> installed system-wide simultaneously, but I don't know about
> different copies of the *same* version. It must be possible
> to have multiple "private" ones, since the abovementioned tools
> manage it somehow.
> 
Well, I have an embedded implementation (of 2.2.2) on the same Windows 
machine as my vanilla 2.2.2 install.  I 'installed' a copy of 2.2.2 in a 
subdirectory of my application (just like the release!).  To start my app, 
I have a small program which sets up the "Path"s and exec's my main 
application which initializes a Python interpreter instance linked to the 
normal .DLLs/libraries present down there somewhere in my application tree.  
The small program is necessary on Windows because the Windoze loader tries 
to find all the linked DLLs at load time.... it's too late to muck with 
paths at that point.  All the libraries, demos, and docs are there for use, 
just not in the "normal" places.   Pmw.Blt even works!

The only fly in the ointment is PythonWin and it's siblings.  I NEED them 
but they make significant use of registry entries.  For my release package, 
I monitored the registry changes when installing into my application 
directory and made a cut/paste registry updater that I run as part of the 
install process.  Oh well......




More information about the Python-list mailing list