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

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.

主站蜘蛛池模板: 苏尼特右旗| 库尔勒市| 包头市| 和顺县| 龙江县| 唐海县| 朔州市| 望都县| 无极县| 河北区| 白水县| 宁化县| 蚌埠市| 洱源县| 邳州市| 黄龙县| 资溪县| 麻栗坡县| 黄冈市| 贡嘎县| 凭祥市| 额尔古纳市| 临夏县| 舟山市| 南丹县| 阿克陶县| 北辰区| 樟树市| 八宿县| 枝江市| 大邑县| 当雄县| 黎平县| 吐鲁番市| 神农架林区| 麻阳| 襄垣县| 枣庄市| 汉中市| 临高县| 广南县|