Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3341098
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:41:02+00:00 2026-05-18T00:41:02+00:00

We have an application based on Excel 2003 and Python 2.4 on Windows XP

  • 0

We have an application based on Excel 2003 and Python 2.4 on Windows XP 32bit. The application consists of a large collection of Python functions which can be called from a number of excel worksheets.

We’ve notcied an anomolous behavior which is that sometimes in the middle of one of these calls the python interpreter will start hunting around for modules which almost certainly are already loaded and in memory.

We know this because we were able to hook-up Sysinternal’s Process Monitor to the process and observe that from time to time the process (when called) starts hunting around a bunch of directories and eggs for certain .py files.

The obvious thing to try is to see if the python search-path had become modified, however we found this not to be the case. It’s exactly what we’d expect. The odd thing is that:

  • The occasions on which this searching behavior was triggered appears to be random, i.e. it did not happen every time or with any noticable pattern.

  • The behavior did not affect the result of the function. It returned the same value irrespective of whether this file searching behavior was triggered.

  • The folders that were being scanned were non-existant (e.g. J:/python-eggs ) on a machine where J-drive contained no-such folder. Naturally procmon reports that this generated a file-not found error.

It’s all very mysterious so I dont expect anybody to be able to provide a definitive answer as to what might be going wrong. I would appreciate any suggestions about how this problem might be debugged.

Thanks!

Answers to comments

  1. All the things that are being searched for are actual, known python files which exist in the main project .egg file. The odd thing is that at the time they are being searched-for those particuar modules have already been imported. They must be in memory in order for the process to work.

  2. Yes, this affects performance because sometimes this searching behavior tries to hit network drives. Also by searching eggs which couldnt possibly contain certain modules it the process gets interrupted by the corporate mandated virus-scanner. That slows down what would normally be a harmless and instant interruption.

  3. This is stock python 2.4.4. No modifications.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:41:02+00:00Added an answer on May 18, 2026 at 12:41 am

    Python programs can import modules at any time, not just during program load. Try searching the modules you are using for import.

    If this doesn’t work, you can write an import hook to catch and report all attempted imports before they occur. For example, if you run this before everything else, you will get a dump of every attempted import and its source:

    import sys, traceback
    
    class ImportDebugger:
        def find_module(self, fullname, path=None):
            print "Attempting to import %s:" % fullname
            traceback.print_stack()
    
    sys.meta_path.insert(0, ImportDebugger())
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an Excel 2002/XP based application that interacts with SQL 2000/5 to process
I have created an iPhone application based on an OpenGL view. Now I would
Hi I am developing a simple application based upon ASP.NET MVC. I have altered
I have a web-based application that notifies users of activity on the site via
I have installed pylons based application from egg, so it sits somewhere under /usr/lib/python2.5/site-packages.
I have to create a dialog based application, instead of old CFormView type of
We have a web application that is based around a form that gets passed
I have a legacy C++-based application that timestamps incoming network traffic using the CRT
I have a client of my web based application who heavily uses the data
We have an application containing a lot of user controls that update frequently based

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.