Wednesday, June 4, 2008

Python QuickTip

I'm not much of a Python user. I don't care for the syntax (probably because I don't use it enough). It took me forever to find where I could read the input list from a toolbox in ArcGIS...i.e. a multivalue parameter.

Here is the help file that I found. Look under the Using a multivalue input in a script section.

Another problem I have with Python mostly comes from ArcGIS, which is the only time I ever use Python. Well, most of programming revolves around Spatial Software in some way. Everytime I try and do something with the geoprocessing scripts, I seem to run into a bug. I wrote a script once that exported coverages from all the featureclasses in a workspace. This script stopped to function from the toolbox with service pack 3 (9.2). I think this is working again with service pack 4. Also, apparently the reset method on a lot of the cursors do not work, so forget about reusing a cursor. Seems like every time I need to write a little geoprocessing script I need to try and figure out a workaround because I find another problem. Granted though, I've had some success too.

On a completely different note:

I was also updating my Antivirus and saw that one way to help them was add a link to their site. I use the ClamWin open source antivirus program. I've probably used it for maybe a year, and have been happy with it. It isn't the beast of a software that Norton is. I can only vouch for it on a personal computer, so I don't know how it would work at an "enterprise" level. I haven't had any viruses, but then again, I didn't have any before I installed it either...knock on cyber wood.

No comments: