# Pyzo Startup Script for Python 2.7 for ArcGIS x64 # # This script adds references to the python for win32 # extensions, and other scientific extensions, so that # they will work with the server's arcpy even without # admin rights. It is for pyzo on public server # platforms where the python for ArcGIS installation # does not have the extensions and cannot be changed # by non-admins. # This script, in conjunction with a correctly configured # external python environment, exposes the entire Win32 # API and the object models of all registered COM # components on the server, right alongside arcpy. # This increases the power of the python for ArcGIS # installation by an order of magnitude. # In order for the entire external python environment to # be portable, and in order for the pypiwin32 extensions # to work, without admin rights, the runtime dll and the # pypiwin32 DLLs MUST be in the same directory as the # python executable. # # the path to your external python 2.7 64-bit installation. # major version, minor version, and bitness MUST match their # counterparts in the ArcGIS python environment. import sys thePath = 'I:\\Programs\\python\\2\\64' myPaths = [ thePath + '\\lib\\site-packages', thePath + '\\Lib\\site-packages\\pythonwin', thePath + '\\Lib\\site-packages\\pythonwin\pywin', thePath + '\\lib\\site-packages\\pywin32_system32', thePath + '\\lib\\site-packages\\win32', thePath + '\\lib\\site-packages\\win32com', thePath + '\\lib\\site-packages\\win32comext', thePath + '\\lib\\site-packages\\win32\\lib' ] for aPath in myPaths: sys.path.insert(1, aPath)