Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just noticed that in the arcpy module (Esri) there's a sys sub-module. Does anyone know what the difference is in using one or the other? I've been looking around and can't find anyone who uses arcpy.sys, so why would it be there?

edit: I wasn't clear, but arcpy.sys seems to be exactly the same as the python built-in sys module.

share|improve this question
up vote 7 down vote accepted


arcpy imports the builtin sys module which is why it shows up in the arcpy namespace. Have a look at the arcpy/ code. It also imports other standard modules, such as os, glob,etc... which are then available in the arcpy namespace.

Try this in your python interpreter:

>>> import arcpy,sys,os
>>> print sys
<module 'sys' (built-in)>
>>> print arcpy.sys
<module 'sys' (built-in)>
>>> print sys==arcpy.sys
>>> print os==arcpy.os
share|improve this answer
Thank you, that helps me understand a lot. – cndnflyr May 9 '13 at 21:19

That module really is the core sys module and not actually related to Arcpy:

>>> import arcpy.sys
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named sys
>>> import arcpy
>>> import sys

Really, Arcpy is just ESRI's name for geoprocessing tools that can be accessed via Python.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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