Is there a way of importing arcpy during the launch of my custom built application so that any usage of arcpy methods after the fact won't require the 3-4 seconds that it takes to import the arcpy module?

I am using wxPython for my GUI library if that helps. Preferably, the import would be done right after the MainLoop() launch of my GUI. This would lock up the GUI for a few seconds, but I can mitigate user experience issues with a busyinfo message or the like.

  • I might cross-pollinate this question to stackoverflow because it is generally relevant to the larger programming community. I am interested however in grabbing the attention of the larger arcpy/programming community here in gis.stackexchange. Commented Jul 16, 2012 at 15:01
  • Please move to stackoverflow for a wider audience. Commented Jul 18, 2012 at 3:33
  • arcpy is specific to ArcGIS though is 'ArcPy site-package is built closely upon Python 2.6' help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//…
    – Mapperz
    Commented Jul 18, 2012 at 13:11

1 Answer 1


If you import arcpy in your main module, it should stay available and not be re-imported by any sub-module. What happens when you import any module, apart from the loading, is a check and/or update to sys.modules. Any subsequent import statements check this sys.modules dictionary before going to disk to load something. If arcpy is part os sys.modules already, it will not be reloaded but rather reused.

Some interesting information is provided here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.