A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-December/041399.html below:

[Python-Dev] Improve Python for embedding

[Python-Dev] Improve Python for embeddingMartin v. Loewis martin at v.loewis.de
Mon Dec 22 15:39:20 EST 2003
Guido van Rossum wrote:

> Not quite -- I don't understand why *you* don't want the environment
> variables to be used, if all you want is a better pythonw.exe.

I haven't embedded Python for a while, but I can sympathize with the
desire to ignore environment variables.

One approach to embedding is to provide a complete (stripped) copy
of Python, inside the target directory of the application. You might
even directly link with a static python23.lib, and freeze all
modules, instead of linking with python23.dll, and providing a copy
of all .py files.

In such an environment, you don't want a regular Python installation
to interfere with your embedded environment. For example, you may
have incorporated the library Foo, but the target system has another
(older) copy of Foo in PYTHONPATH. If your embedded application now
picks up the older copy of Foo, it fails, and all your testing goes
to hell (*) since arbitrary pieces of the library might get arbitrarily
replaced with something else.

So to allow reproducable results, you need a guarantee that nothing
on the target system is incorporated in your application.

Regards,
Martin

(*) DLL hell, to be precise.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4