We have an application based on Excel 2003 and Python 2.4 on Windows XP 32bit. An application consists of a large set of Python functions that can be called from multiple excel tables.
We carried an abnormal behavior, which sometimes in the middle of one of these calls, the python interpreter will start hunting around modules that are almost certainly already loaded in memory.
We know this because we were able to connect the Sysinternal Process Monitor to the process and observe that from time to time the process (when it is called) begins to hunt around a bunch of directories and eggs for certain .py files.
The obvious thing is to try to check if the python search path has changed, however we found that it is not. This is exactly what we expect. It is strange that:
The cases in which this search behavior was triggered appear random, i.e. this does not happen every time or with any noticeable pattern.
The behavior did not affect the result of the function. It returned the same value regardless of whether this file search behavior was triggered.
The folders that were scanned did not exist (for example, J: / python-eggs) on a machine where the J-drive did not contain such a folder. Naturally, procmon reports that it caused an error not found in the file.
All this is very mysterious, so I do not expect anyone to be able to give a definitive answer about what could go wrong. I would appreciate any suggestions on how this issue can be debugged.
Thank!
Comments replies
, , , python, .egg. , , , . , .
, , . , , , , , -. , .
python 2.4.4. .