|
POST
|
Curtis, I would think so, but haven't specifically tested. I haven't had any issues with a number of python toolboxes I've written that use gdal. If I get a chance, I'll test.
... View more
02-19-2016
12:01 PM
|
0
|
0
|
8235
|
|
BLOG
|
Dan Patterson wrote: 29.13. site — Site-specific configuration hook — Python 3.5.1 documentation so from their example in 3.5, it will look like this Then the following version-specific directories are added to sys.path , in this order: /usr/local/lib/pythonX.Y/site-packages/bar /usr/local/lib/pythonX.Y/site-packages/foo but only if you keep a /user/local/lib path, I presume. I'm not sure what you're trying to illustrate there Dan. Other than the deprecation and removal of "site-python" (that nobody uses anyway), nothing has really changed in regards to system site-packages and per-user site-packages handling. /usr/local/lib/pythonX.Y is one of the system site-packages directories and is standard on Linux (for both Python 2 & 3). It's where stuff gets installed when you use pip/easy_install etc (without specifying the --user flag) rather than the distribution package manager (which installs to /usr/lib/pythonX.Y). And more importantly... Curtis' usercustomize.py will continue to work in 3.5
... View more
02-18-2016
02:18 PM
|
1
|
0
|
873
|
|
BLOG
|
Here's mine: usercustomize3264 1.0.0 : Python Package Index
... View more
02-18-2016
12:54 PM
|
1
|
0
|
873
|
|
BLOG
|
Dan Patterson, that deprecation is nothing to do with " site. USER_SITE/usercustomize.py ". It relates to: $PREFIX/lib/site-python (e.g. /usr/lib/site-python), which is added to sys.path in addition to the versioned site-packages. But only under Unix ("if os.sep == '/'") Issue 19375: Deprecate site-python in site.py - Python tracker
... View more
02-18-2016
12:51 PM
|
0
|
0
|
873
|
|
BLOG
|
Is this saved as the special "usercustomize.py" module? 28.14. site — Site-specific configuration hook — Python 2.7.11 documentation
... View more
02-18-2016
10:55 AM
|
0
|
0
|
873
|
|
POST
|
No, you can't pass a tuple (the "row") to the Select by Location tool. You should be able to pass a geometry though. And if I understand what you're trying to do correctly, you have your select from and select by features in the wrong order. Try: with arcpy.da.SearchCursor(fc, ["SHAPE@", "totalest", ..., "DY"]) as C_update:
for Cup_row in C_update:
C_count+=1
Cup_shape = Cup_row[0]
Cup_totalest = Cup_row[1]
...
Cup_DY = Cup_row[8]
...
arcpy.SelectLayerByLocation_management(P_paths, "COMPLETELY_CONTAINS", Cup_shape, "", "NEW_SELECTION")
... View more
02-06-2016
12:54 PM
|
1
|
1
|
1640
|
|
POST
|
It's not just r'\', but any trailing backslash, i.e r'C:\'
... View more
02-03-2016
03:09 PM
|
0
|
1
|
4562
|
|
POST
|
I tend to use r'' as well. Except when it doesn't work.
... View more
02-03-2016
02:18 PM
|
1
|
3
|
4562
|
|
POST
|
Adrian Welsh wrote:
Can't you also use double backslash in place of the regular backslash in order to make the path correct?
inTable = "c:\\test.csv" inTable = "c:\\test.csv" Yes. And forward slashes work as well: inTable = "c:/test.csv"
... View more
02-03-2016
01:40 PM
|
1
|
1
|
4562
|
|
POST
|
Peter Wilson wrote: I don't seem to have the following directory under C Drive: %AppData%\Python\Python27\site-packages. You can create it and python will use it automatically (PEP370). I strongly recommend against putting stuff in the ArcGIS folder.
... View more
02-02-2016
01:54 PM
|
1
|
2
|
6370
|
|
POST
|
I wouldn't put your script in the ArcGIS directory. You're better off moving it to %AppData%\Python\Python27\site-packages. I think you should focus on your earlier question and try and get HEC-GeoHMS running from its toolbox. Instead of exporting a model, run the tool from the GUI, open the results window, right-click the result from the tool you just ran and select "copy as python snippet"
... View more
02-02-2016
12:36 AM
|
0
|
4
|
6370
|
|
POST
|
Python doesn't know where to find C:\Projects\GeoHMSTools.py A few ways to tell python where to look: Save your python script to C:\Projects (python will look in the same directory as your script for any modules); Append C:\Projects to your sys.path; Install the module to your USER SITE directory (%AppData%\Python\Python27\site-packages)
... View more
02-01-2016
02:03 PM
|
2
|
7
|
6370
|
|
POST
|
+1 for Dan's recommendation, but if you need/prefer to stick with ye olde Python 2.7, I strongly recommend not upgrading anything numpy/matplotlib related in the ArcGIS installed version as you can break ArcGIS / ArcPy (I have done this before). If you want to upgrade/install the scipy stack, use a virtualenv (my preferred method) or a separate install, like Anaconda.
... View more
01-31-2016
03:04 PM
|
0
|
4
|
1996
|
|
BLOG
|
You're missing SHORT and TEXT types: dtypes = {'OID': 'LONG', 'SmallInteger': 'SHORT', 'Integer': 'LONG',
'Double': 'DOUBLE', 'Single': 'FLOAT', 'String': 'TEXT',
'Date': 'DATE'}
... View more
01-28-2016
02:50 PM
|
0
|
0
|
299
|
|
POST
|
Use .append instead of .extend - paraphrased from the python docs: list.append(x) Add an item to the end of the list; list.extend(L) Extend the list by appending all the items in the given list i.e append is for adding a single item to the list, extend is for adding multiple items in a list to the list
... View more
01-26-2016
03:37 PM
|
1
|
0
|
1202
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-24-2022 03:08 PM | |
| 1 | 07-30-2025 03:00 PM | |
| 1 | 06-10-2025 08:06 PM | |
| 5 | 05-20-2025 07:56 PM | |
| 1 | 05-04-2025 10:34 PM |