[cx-freeze-users] import error with module time
Brought to you by:
atuining
From: <jef...@in...> - 2004-06-23 17:04:33
|
The following problem occurs in both version 2.2 and 3.0Beta1 I'm using Python 2.3 in short: when I import module time in a secundary module (one which is imported in the main module), and use it's functions, I get the following error: 'No module named _strptime' It works when I run a.py interpreted. I have a main Python module a.py which calls a routine in another module b.py: a.py ----- import b b.test() b.py ----- import time def test(): time_stamp = time.strptime("01JAN00 01:02:03", "%d%b%y %H:%M:%S") print time_stamp I compile everthing as follows: %PYTHON_FREEZE%\FreezePython.exe --base-binary=%PYTHON_FREEZE% \bases\Console.exe --install-dir=bin --target-name=test.exe a.py This is the output: Name File ---- ---- m UserDict C:\Python23\lib\UserDict.py m __main__ a.py m _sre C:\Python23\DLLs\_sre.pyd m array m b b.py m copy C:\Python23\lib\copy.py m copy_reg C:\Python23\lib\copy_reg.py m errno m macpath C:\Python23\lib\macpath.py m nt m ntpath C:\Python23\lib\ntpath.py m os C:\Python23\lib\os.py m os2emxpath C:\Python23\lib\os2emxpath.py m popen2 C:\Python23\lib\popen2.py m posixpath C:\Python23\lib\posixpath.py m re C:\Python23\lib\re.py m repr C:\Python23\lib\repr.py m sre C:\Python23\lib\sre.py m sre_compile C:\Python23\lib\sre_compile.py m sre_constants C:\Python23\lib\sre_constants.py m sre_parse C:\Python23\lib\sre_parse.py m stat C:\Python23\lib\stat.py m string C:\Python23\lib\string.py m strop m sys m time m types C:\Python23\lib\types.py Missing modules: ? Carbon.File imported from macpath ? ce imported from os ? mac imported from os ? org.python.core imported from copy ? os.path imported from os ? os2 imported from os ? posix imported from os ? pwd imported from posixpath ? riscos imported from os ? riscosenviron imported from os ? riscospath imported from os File bin\test.exe written. Copying C:\Python23\DLLs\_sre.pyd Copying C:\WINNT\system32\python23.dll Frozen binary bin\test.exe created. Done. This is the output when I run test.exe: Traceback (most recent call last): File "a.py", line 3, in ? File "b.py", line 4, in test ImportError: No module named _strptime |