Hi all,When I run the following snippet in PythonWin, the results come back with the correct location (C:\PSL\Scripts). However, when this code is loaded into the ArcMap Python Window, the results are different and incorrect! I will be sharing a tool that will be run from the Python Window in ArcGIS and I need to create a (correct) relative workspace for it. Suggestions?
#import modules and define workspace
import arcpy
import os
import traceback
import sys
arcpy.env.workspace = sys.path[0]
print arcpy.env.workspace
When run in PythonWin, I get:>>> C:\PSL\ScriptsWhen run in ArcMap Python Window, I get:C:\WINDOWS\system32\python26.zipI need ArcMap Python Window to return the same value as the value from PythonWin!!!Im using ArcGIS 10 (ArcInfo level), Python26, Windows 7