To me, Python will be a way to automate workflows, increase efficiency, create new tools, and expose me to working with code. It's a useful and well-known language that will assist me in completing GIS projects and securing employment after my certificate program is done. And who knows, I may find I really like it! I certainly have enjoyed the little bit of scripting we did last semester.
For this week's lab, we were simply asked to run a provided script that would create all the folders we will need to store our course data and deliverables. Using PythonWin as my IDE (integrated development environment) or editor, I opened the script and clicked on the Run button in the toolbar. There are multiple ways to tell a script to run, including the button I used, clicking File-Run, or double-clicking on the script file. When I opened my student drive, there was the main GIS Programming folder and all the folders within that. See below for a screenshot of my scripted folder creation.
At first I wasn't sure how to know the script had run or finished running, then I read at the bottom of the script "print Process Complete" as the final input. I realized my script window was covering my interactive window, so once I moved it, I was able to see that "Process Complete" was next to the prompt, telling me the script had run and was finished. Good lesson to remind myself to arrange the editor windows to show both the scripts and the messages. Next up, creating my own scripts or at least working towards that!
![]() |
| GIS Programming folders in student drive created by running a provided script through PythonWin editor. |

No comments:
Post a Comment