From d.riseberg at verizon.net Tue Oct 1 14:31:34 2013 From: d.riseberg at verizon.net (david) Date: Tue, 01 Oct 2013 08:31:34 -0400 Subject: [capi-sig] Help upgrading from an older version Message-ID: Hi: I have a game, which uses Python, called Jewel Quest The Sapphire Dragon by iWin.com. I also use a program, which helps me keep my programs up to date, called Secunia PSI. It shows the Python 2.7.x is out of date. The file location is C:\Program Files(x86)\iwin.com\Jewel Quest The Sapphire Dragon\python27.dll and the installed version is 2.7.1150.1103. According to my searches, Python is available up to vers. 2.7.5. How do I Update/Upgrade this version of Python to a newer version. When I tried to update previously, it either wanted me to install a new program (C:\Python) or replace the game directory. What are the proper steps to upgrade the portion of the game I need? Thanks David Riseberg d.riseberg at verizon.net From hniksic at xemacs.org Tue Oct 1 19:14:05 2013 From: hniksic at xemacs.org (Hrvoje Niksic) Date: Tue, 01 Oct 2013 19:14:05 +0200 Subject: [capi-sig] Help upgrading from an older version In-Reply-To: (david's message of "Tue, 01 Oct 2013 08:31:34 -0400") References: Message-ID: <8738okud5u.fsf@xemacs.org> Hello! "david" writes: > I have a game, which uses Python, called Jewel Quest The Sapphire > Dragon by iWin.com. I also use a program, which helps me keep my > programs up to date, called Secunia PSI. It shows the Python 2.7.x is > out of date. The file location is C:\Program Files(x86)\iwin.com\Jewel > Quest The Sapphire Dragon\python27.dll and the installed version is > 2.7.1150.1103. According to my searches, Python is available up to > vers. 2.7.5. How do I Update/Upgrade this version of Python to a > newer version. When I tried to update previously, it either wanted me > to install a new program (C:\Python) or replace the game directory. > What are the proper steps to upgrade the portion of the game I need? Your question is best suited for the general Python mailing list at python-list at python.org. This forum is for questions about development with the Python's C API. However, if your Python comes bundled with the game, it is likely not possible to update the in-game Python without updating the game. If the game's developers still offers support, you might want to take up the question with them. Otherwise, you should probably just live with the older Python. From mateusz at loskot.net Mon Oct 7 14:31:03 2013 From: mateusz at loskot.net (Mateusz Loskot) Date: Mon, 7 Oct 2013 13:31:03 +0100 Subject: [capi-sig] The same Python DLL loaded twice Message-ID: Hi, I'm experiencing strange issue with the very same python32.dll being loaded twice on Windows. I have an application which embeds Python. Launching my app loads python32.dll for the first time and all seems working well. Next, under the embedded Python, I execute this one-liner "import tkinter" This triggers loading of _tkinter.pyd, tk85.dll, tcl85.dll as well as python32.dll for the second time. The duplicate python32.dll is loaded into different address space, maintains its own thread state, leading to crash from PyInit__tkinter, obviously. The problem seems to be similar to this one http://stackoverflow.com/questions/2147729/dll-file-loaded-twice-with-dll-redirection-through-manifest/ Has anyone experience similar issues? Any ideas on possible reasons of duplicate loading of python32.dll? Best regards, -- Mateusz Loskot, http://mateusz.loskot.net From mal at egenix.com Mon Oct 7 14:38:01 2013 From: mal at egenix.com (M.-A. Lemburg) Date: Mon, 07 Oct 2013 14:38:01 +0200 Subject: [capi-sig] The same Python DLL loaded twice In-Reply-To: References: Message-ID: <5252AB29.6030305@egenix.com> On 07.10.2013 14:31, Mateusz Loskot wrote: > Hi, > > I'm experiencing strange issue with the very same python32.dll being > loaded twice on Windows. > > I have an application which embeds Python. > Launching my app loads python32.dll for the first time and all seems > working well. > Next, under the embedded Python, I execute this one-liner > "import tkinter" > > This triggers loading of _tkinter.pyd, tk85.dll, tcl85.dll as well as > python32.dll for the second time. > > The duplicate python32.dll is loaded into different address space, > maintains its own thread state, > leading to crash from PyInit__tkinter, obviously. > > The problem seems to be similar to this one > http://stackoverflow.com/questions/2147729/dll-file-loaded-twice-with-dll-redirection-through-manifest/ > > Has anyone experience similar issues? > Any ideas on possible reasons of duplicate loading of python32.dll? Could you check the version numbers of those two DLLs. It's possible that you're loading a Python DLL for say 3.2.1 and one for 3.2.2. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Oct 07 2013) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2013-10-14: PyCon DE 2013, Cologne, Germany ... 7 days to go ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From mateusz at loskot.net Mon Oct 7 18:07:27 2013 From: mateusz at loskot.net (Mateusz Loskot) Date: Mon, 7 Oct 2013 17:07:27 +0100 Subject: [capi-sig] The same Python DLL loaded twice In-Reply-To: <5252AB29.6030305@egenix.com> References: <5252AB29.6030305@egenix.com> Message-ID: On 7 October 2013 13:38, M.-A. Lemburg wrote: > On 07.10.2013 14:31, Mateusz Loskot wrote: >> Hi, >> >> I'm experiencing strange issue with the very same python32.dll being >> loaded twice on Windows. >> >> I have an application which embeds Python. >> Launching my app loads python32.dll for the first time and all seems >> working well. >> Next, under the embedded Python, I execute this one-liner >> "import tkinter" >> >> This triggers loading of _tkinter.pyd, tk85.dll, tcl85.dll as well as >> python32.dll for the second time. >> >> The duplicate python32.dll is loaded into different address space, >> maintains its own thread state, >> leading to crash from PyInit__tkinter, obviously. >> >> The problem seems to be similar to this one >> http://stackoverflow.com/questions/2147729/dll-file-loaded-twice-with-dll-redirection-through-manifest/ >> >> Has anyone experience similar issues? >> Any ideas on possible reasons of duplicate loading of python32.dll? > > Could you check the version numbers of those two DLLs. > > It's possible that you're loading a Python DLL for say 3.2.1 > and one for 3.2.2. Yes, I have checked that file name, file path and version of the Python DLL which is loaded twice are all the same. The two loadings refer to the very same file. I eventually found where is the problem. The application which embeds Python is linked with Python DLL and it refers to Python assembly using custom manifest specified wit #pragma comment(linker, "\"/manifestdependency:name='Python' ... ) But, _tkinter.pyd does not load Python through the manifest. So, the application and the _tkinter.pyd link to Python DLL as they would be two distinct assemblies. If I remove the /manifestdependency directive from my application, rebuild it and ensure Python DLL is present in DLL search path, then no double loading occurs and all works well. The side-by-side technology is a bit slippery :) Best regards, -- Mateusz Loskot, http://mateusz.loskot.net