In languages like C/C++, preprocessing is a common step applied to source files before compilation. These directive statements are interpreted, and the resulting program output is conditional based on those statements. Be sure that line numbers are enabled in Komodo ( View > View Line Numbers) and that preprocess.py is displayed in the Komodo Editor.Ībout Preprocessors: A preprocessor is a program that examines a file for specific statements called “directive statements”. This program is an advanced Python script that is best addressed by focusing on certain areas within the code. In this step, you will analyze the Python program preprocess.py in sections. This section reviews the code in preprocess.py and contenttype.py. This file opens in the Editor pane, and a tab at the top of the pane displays the filename. In the Places sidebar, double-click the preprocess.py file. helloworld and helloworld.py: Sample files to process using preprocess.py.content.types: A support file used by the Python module contenttype.py.contenttype.py: A Python module used by the main program ( preprocess.py) to identify the language of a given file.preprocess current file: A run command for executing preprocess.py on the file currently open in Komodo.This Python program parses input source files and produces output filtered on a set of rules and statements embedded in the original input source. The following components are included in the Python tutorial project file: The tutorial project will open in the Places sidebar. Select Help > Tutorials > Python Tutorial. See Interactive Shell and Debugging Programs for more information on this Komodo functionality. Explore Python using the Komodo interactive shell.Debug the program using the Komodo debugger.Run the program and generate program output.Analyze contenttype.py the Python module included in the Tutorial Project.Analyze preprocess.py the Python program included in the Tutorial Project.In particular, this tutorial examines a Python script that preprocesses files (similar to the C preprocessor). The Python Tutorial demonstrates how to use the Komodo debugger and interactive shell to explore a Python program. You are interested in Python and have some programming experience either in Python or another language.You are interested in learning about Komodo functionality, including the debugger and the interactive shell.See the Debugging Python documentation for configuration instructions. ActivePython is a free distribution of the Python language.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |