473,388 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Re: What parts of C:\Python25 are important?

Robert Dailey wrote:
I've currently embedded the python interpreter into a C++ application of
mine. I want to bundle the python core library with my application so
the user does not have to install python to use my application. What
files do I need to copy over? Help is appreciated, thank you.
off the top of my head:

- python25.dll (from \windows\system32, usually)

- any extension PYD:s and DLL:s you're using (from \python25\DLLs)

- either the contents of the standard library (\python25\Lib)
in PY and/or PYC form, or a zipped archive that contains all
the PYC files in there (zipped relative to \python25\Lib).

- (optional) MSVCR71.dll (but that's usually already installed, afaik)

you also need to make sure that your application sets an appropriate
path before it starts importing things, either by munging sys.path via
embedded Python code, or via a call to Py_SetPythonHome. the comment
block at the top of

http://svn.python.org/projects/pytho.../PC/getpathp.c

explains how the default path is created on Windows.

in some cases, it helps to tell Python not to import the "site" module
by itself, and then import site when you've set everything up. to do
that, insert "-S" in the argv buffer before calling PySys_SetArgv. you
may also want to remove any PYTHON-related environment variables from
the local environment, before initializing Python.

</F>

Aug 19 '08 #1
0 903

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Eric Veltman | last post by:
Hello everyone, I've posted this question before, but got no answer, so I'll try to reformulate the question, maybe it helps :-) By the way, this is not intended as the start of an ASP.NET...
35
by: wilsonidv | last post by:
Daer All: I have studied C language for just 2~3 months. I'd like to know the critical parts of C, focusing on these. Could anyone has many experiences tell me, please. Thanks and Regards.
1
by: Rolf Welskes | last post by:
Hello, I have a large web which has PartA, PartB, PartC and MainPart. MainPart WebPage01 ... WebPage_n PartA .... PartB WebPageB01 ... WebPageB_m PartC ... So I would like to do the...
3
by: Colin J. Williams | last post by:
As part of the Python initialization, C:\Windows\System32\Python25.zip is set up in the path. I haven't seen any documentation on the use or purpose of the zip file. Colin W.
18
by: =?Utf-8?B?Q2hhcmxlc0E=?= | last post by:
I've just finished getting my web 2.0 MCTS, and the exam seemed to have a disproportionate interest in Web Parts. Personally, I don't really see the point of them Should I think again? can...
1
by: ebzzry | last post by:
I'm trying to run an application and I got this: % meld Traceback (most recent call last): File "/usr/local/bin/meld", line 73, in <module> pygtk.require("2.0") File...
2
by: Marc | last post by:
I am trying something out with WebParts. Now after I have closed WebParts in a try-out page I made, I cannot get the closed parts 'back'. I have cleared cookies, internet files, restarted,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.