Python 3.4.1 script syntax error, arcpy &

前端 未结 1 1614
夕颜
夕颜 2020-12-04 03:44

I am used to working in python 2.7 so there was some new things like the print function being different. So excuse my ignorance. I am also pretty new to programming.

相关标签:
1条回答
  • 2020-12-04 04:14

    Backslashes (used by you as Windows path separators) signal escape sequences in Python strings. Double the backslashes or use a raw string literal:

    "F:\\Pro_Projects\\NAIP2013\\raster.sde"
    

    or

    r"F:\Pro_Projects\NAIP2013\raster.sde"
    

    Windows also accepts forward slashes in paths, avoiding the issue altogether:

    "F:/Pro_Projects/NAIP2013/raster.sde"
    
    0 讨论(0)
提交回复
热议问题