I have tried the simple solution of disabling the version check and I was able to install and run the ctypes unittests on the ARM emulator.
............................................................................................................................................................................................................................................................................ ---------------------------------------------------------------------- Ran 269 tests in 168.000s OK Thomas: I can give you the build of Python that I used, if you want. Luke ----- Original Message ----- From: "Luke Dunstan" <[EMAIL PROTECTED]> To: "Thomas Heller" <[EMAIL PROTECTED]> Cc: <pythonce@python.org> Sent: Saturday, December 17, 2005 11:04 AM Subject: Re: [PythonCE] PythonCE on the ARM emulator > > ----- Original Message ----- > From: "Thomas Heller" <[EMAIL PROTECTED]> > To: <pythonce@python.org> > Sent: Friday, December 16, 2005 2:10 AM > Subject: [PythonCE] PythonCE on the ARM emulator > > >> Since Luke Dunstan has ported ctypes to windows CE, so I got interested >> in this platform. I don't have a Windows CE device, but I found the MS >> Device Emulator (1.0, Community Preview): >> >> http://msdn.microsoft.com/mobility/windowsmobile/downloads/emulatorpreview/default.aspx >> >> To get started, I installed the emulator and tried to install the >> current CE binaries on it. The interactive interpreter works as far as >> I can tell, except that I cannot import any extension modules in it. >> When I try this, 'import _winreg' or 'import socket', Python is >> terminated without any indication what was wrong. >> >> Has anyone with more experience tried to run Python on this 'platform'? >> >> Thanks, >> >> Thomas > > I just tried this and I get the same results. Running it in the debugger > shows that the crash occurs in GetPythonImport() in Python/dynload_win.c. > The code calls LoadLibrary() and then assumes that the returned HMODULE is > actually the base address of the DLL in memory, which is true for other > versions of Windows. The code tries to read the import table from the DLL > file headers to determine whether it is linked to the correct version of > Python (python23.dll in this case). I checked on my PDA and even though it > tries to read from an invalid address it does not crash, so it doesn't > cause > any problems. Apparently the emulator has better memory protection (or > perhaps it is the slightly newer OS running on the emulator) and doesn't > allow this. > > The ideal solution to this problem would be to find the real module > address > from the HMODULE: does anyone know how to do this? The easy solution would > be to use #ifndef MS_WINCE around this code because it is not critical and > is merely a safeguard against loading Python extensions for the wrong > version of Python. > > Luke > _______________________________________________ > PythonCE mailing list > PythonCE@python.org > http://mail.python.org/mailman/listinfo/pythonce > _______________________________________________ PythonCE mailing list PythonCE@python.org http://mail.python.org/mailman/listinfo/pythonce