classification
Title: import tkinter library Visual C++ Concepts:C Run-Time Error R6034 when embeded python in c++
Type: crash Stage:
Components: Tkinter Versions: Python 3.0
process
Status: closed Resolution: duplicate
Dependencies: Superseder: 2.6.1 breaks many applications that embed Python on Windows
View: 4566
Assigned To: Nosy List: amaury.forgeotdarc, ggenellina, guxianminer
Priority: normal Keywords:

Created on 2009-01-28 14:05 by guxianminer, last changed 2009-03-27 15:48 by amaury.forgeotdarc. This issue is now closed.

Messages (7)
msg80710 - (view) Author: wang (guxianminer) Date: 2009-01-28 14:05
import tkinter library Visual C++ Concepts:C Run-Time Error R6034 when 
embeded python in c++
msg80722 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-01-28 19:21
Please be more specific. What did you try exactly?
If you embed python in a C++ application, which compiler did you use?

A sample that reproduce the problem would be most useful.
msg80744 - (view) Author: wang (guxianminer) Date: 2009-01-29 03:38
my compile is gcc 4.2.1
system is windows xp

some other library can be import.
such as:sys os

c++ code line:
    Py_Initialize();
    Py_SetProgramName(L"MyProgram");
    module=PyImport_ImportModule("__main__");
    moduledict=PyModule_GetDict(dodule);
    PySys_SetArgv(1,wxargv);
    PyRun_StringFlags("\
import tkinter\n\
",Py_file_input,moduledict,moduledict,NULL);
Py_finalize();

the urllib.request also can not import.
msg80746 - (view) Author: Gabriel Genellina (ggenellina) Date: 2009-01-29 05:05
os and sys are builtin modules. See if you can import any other pure 
Python module.
Also, see #4566
msg80747 - (view) Author: Gabriel Genellina (ggenellina) Date: 2009-01-29 05:14
(In case the fix in #4566 works for you, please let us know)
msg80755 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-01-29 09:56
Yes, issue4566 describes exactly the same problem.
msg84266 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-03-27 15:48
The issue seems fixed now.
History
Date User Action Args
2009-03-27 15:48:26amaury.forgeotdarcsetstatus: pending -> closed

messages: + msg84266
2009-01-29 09:56:45amaury.forgeotdarcsetstatus: open -> pending
resolution: duplicate
superseder: 2.6.1 breaks many applications that embed Python on Windows
messages: + msg80755
2009-01-29 05:14:24ggenellinasetmessages: + msg80747
2009-01-29 05:05:33ggenellinasetnosy: + ggenellina
messages: + msg80746
2009-01-29 03:38:02guxianminersettype: crash
messages: + msg80744
2009-01-28 19:21:33amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg80722
2009-01-28 14:05:24guxianminercreate