I am using Python IDLE 2.7.18.4 on Windows 10. I copied a code from a pdf in my editor and made it as comments. The code look like this in my editor:
but when I past the code here (in this forum), I see it correctly as I see some parts of the code are not as comments and thus I got an error:
Traceback (most recent call last):
File "D:/ArcPy_Ex/test.py", line 5, in <module>
outfc = arcpy.GetParameterAsText(1)
NameError: name 'arcpy' is not defined
I wonder How I can see the code correctly in the Python IDLE editor?
but when I past the code here (in this forum), I see it correctly as I see some parts of the code are not as comments and thus I got an error:
##import arcpy ##infc = arcpy.GetParameterAsText(0) ## outfc = arcpy.GetParameterAsText(1) ## arcpy.Copy_management(infc, outfc)and I get this error:
Traceback (most recent call last):
File "D:/ArcPy_Ex/test.py", line 5, in <module>
outfc = arcpy.GetParameterAsText(1)
NameError: name 'arcpy' is not defined
I wonder How I can see the code correctly in the Python IDLE editor?