官术网_书友最值得收藏!

What is a Python script?

Let's start with the very basics of writing and executing a Python script. What is a Python script? It is a simple text file that contains a series of organized commands written in a formalized language. The text file has the extension .py, but other than that, there is nothing to distinguish it from any other text file. It can be opened using a text editor such as Notepad or Wordpad, but the magic that is Python does not reside in a Python script. Without the Python interpreter, a Python script cannot be run and the commands it contains cannot be executed.

How Python executes a script

Understanding how Python works to interpret a script and then execute the commands within is as important as understanding the Python language itself. Hours of debugging and error checking can be avoided by taking the time to set up Python correctly. The interpretive nature of Python means that a script will have to be first converted into bytecode before it can be executed. We will cover the steps that Python takes to achieve our goal of automating GIS analysis.

主站蜘蛛池模板: 阿克| 台州市| 廉江市| 新密市| 杂多县| 海原县| 喀喇沁旗| 百色市| 汶川县| 黔东| 扎兰屯市| 虞城县| 渑池县| 盘锦市| 平阴县| 岱山县| 凌源市| 北宁市| 海晏县| 道真| 万山特区| 德令哈市| 渝北区| 长垣县| 泰和县| 突泉县| 新源县| 大英县| 玛多县| 浏阳市| 铁岭县| 康乐县| 汾阳市| 宁明县| 邯郸市| 宝兴县| 阳原县| 新郑市| 南投县| 嫩江县| 监利县|