0% found this document useful (0 votes)
2 views9 pages

1.4 Python Python Work Flow

The document outlines the workflow of Python programming, detailing steps from writing source code to error checking, bytecode generation, and execution via the Python Virtual Machine. It also compares interpreters and compilers, highlighting differences in execution speed, error detection, and use cases. Python is noted for its line-by-line execution and suitability for scripting, while compilers are better for performance-critical applications.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views9 pages

1.4 Python Python Work Flow

The document outlines the workflow of Python programming, detailing steps from writing source code to error checking, bytecode generation, and execution via the Python Virtual Machine. It also compares interpreters and compilers, highlighting differences in execution speed, error detection, and use cases. Python is noted for its line-by-line execution and suitability for scripting, while compilers are better for performance-critical applications.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Let’s Understand Workflow of Python

3 2 1

Error Check
1️⃣ Write Source Code

Use Code Editor to Write source code :


2️⃣ Error Checking
3️⃣ Bytecode Generation
3️⃣ Bytecode Generation
4️⃣ Python Virtual Machine (PVM) + Access to Libraries
5️⃣ Output / Exception Handling
Complete Workflow (Summary Table)

Step Process Example / Output


1️⃣ Source Code print("Hello, World!")
If no syntax errors, proceed.
2️⃣ Error Checking (Syntax)
If syntax error: SyntaxError
3️⃣ Bytecode Generation .pyc files created in __pycache__
Executes code, dynamically loads
4️⃣ PVM + Library Access
libraries (e.g., math, pandas)
Output shown (or runtime errors
5️⃣ Output / Exception Handling
like ZeroDivisionError)
Difference Between Interpreter and Compiler in
Programming
Feature Interpreter Compiler

Translates the entire code at once into machine


Definition Translates code line by line and executes it
code

Execution Speed Slower (because it checks line by line) Faster (code is compiled once and then runs)

Error Detection Shows one error at a time during execution Shows all errors at once after compilation

Example Languages Python, JavaScript, Ruby, PHP C, C++, Java, Go

Intermediate Files No separate file—code is executed directly Generates an executable file (like .exe or .class)

Better for large applications, performance-


Best Use Cases Great for scripting, quick testing, learning
critical code

You might also like