Friday, May 13, 2016

Intro to Python

GIS Programming - Mod 1

This week's assignment was a lot of fun.  We were introduced to Python, the preferred programming language for ArcGIS since 2010.  This assignment didn't require much from us, it was basically just an introduction to the programming language and the different methods for working with it such as IDLE and PythonWin.  The main point of the assignment was to learn how to run an existing script called "CreateModuleFolders.py" to create folders for all the mods of this course.


I followed the instructions exactly and had no problems with this.  When I got to the fourth step, the actual running of the script, I saw there were a few different methods that could be used.  From within the PythonWin window where I was viewing the script the easiest way to run the script would have been to click the little icon of the running man.  But I wanted to watch the actual process of the folders being created so I went back to Windows Explorer and double clicked on the file.  There was a little blip on the screen and then it was done.  So it turned out there was nothing to see after all, but the job was done.

This is such a cool little program I thought I would go ahead and use it to create the same folders on my hard drive.  I made a copy of the script so I wouldn't mess up the original, then changed the path from S to C, but it put it on my network C rather than my hard drive.  Oh, well.  I'm sure once I download Python onto my hard drive I'll solve that little problem.  In the meantime, I'm really excited to use it for setting up my folders for my applications class too, just as soon as I figure out what folders I'll need for that class.

I know this is just the first assignment and it was a simple one, but I just know I'm going to love this class.  I can tell already it's going to be a lot of fun, and even the mistakes will be a blast to troubleshoot and figure out.

No comments:

Post a Comment