Data Structures & Built-ins Roadmap
🏷️ Course Modules
Welcome to the module! Below is the complete roadmap of chapters and lessons. Click any topic to get started.
Chapter 11
- Python File as an Isolated Module
- Module Search Path Mechanics
- Built-in vs Third-Party vs Custom Modules
- Importing a Whole Module Namespace
- Importing Specific Items via From
- Importing with a Shorter Alias
- Wildcard Star Imports Dangers and Avoidance
- The os Module for System Interactions
- The sys Module for Interpreter Parameters
- The subprocess Module for Shell Execution
- The socket Module for Low-Level Networking
- The time and datetime Modules for Tracking
- The re Module for Regex Pattern Matching
- The json Module for Data Serialization
- The logging Module for Structured Logs
- The name == main Pattern Execution Mechanics
- Writing Reusable Module Files
- Importing Custom Modules Locally
- The Batteries Included Philosophy
- Navigating the Official Python Documentation
- Important Library Categories Summary
Chapter 12
- File Opening with the open() Function
- File Modes (Read, Write, Append, Binary)
- Manual File Closing Dangers
- Context Managers and with open Standard
- Reading Entire File as a String
- Reading Single Line-by-Line Sequences
- Reading All Lines into a List Array
- Memory Efficient Line Iteration Loops
- Writing Strings with write()
- Writing Lists of Strings via writelines()
- Appending Without Overwriting Targets
- Practical Example: Writing Script Execution Logs
- Path Operations with os.path Utilities
- Cross-Platform Path Building via join
- Existence Checks and File/Directory Validation
- Modern Path Management with pathlib
- The csv Module for Reading and Writing Lists
- Using csv.reader and csv.writer
- Dictionary Mapping with csv.DictReader
- Practical Example: Reading Server Inventory CSVs
- File Deserialization via json.load()
- File Serialization via json.dump()
- String Serialization via loads and dumps
- Practical Example: Reading JSON Configurations
Chapter 13
- Interpreter Error Raising Concepts
- Common Built-in Exceptions Catalog
- Syntax Errors vs Runtime Exceptions
- Basic Try-Except Structures
- Catching Specific Exception Types
- Multiple Except Blocks Handling
- Capturing Messages via except Exception as e
- Successful Execution Blocks with else
- Guaranteed Cleanup Execution via finally
- Practical Example: Closing Connections and Files
- Intentional Error Triggering via raise
- Re-raising Caught Exceptions Patterns
- Architectural Reasons for Raising Exceptions
- Inheriting from the Base Exception Class
- Code Clarity Improvements via Custom Errors
- Practical Example: ConnectionFailedError Definition
- Bare Except Pitfalls and Avoidance
- Exception Silencing Dangers and Logging Needs
- Logging Module Integration vs Print Statements
- Architectural Fail-Fast vs Graceful Degradation
Chapter 14
- Directory Retrieval and Navigation (getcwd, chdir)
- Listing Directory Contents via listdir
- Creating Directories (mkdir, File Structures)
- Deleting Files and Directories (remove, rmdir)
- Renaming Files and Targets with os.rename
- Reading Active Shell Environment Variables
- Safe Environment Variable Retrieval via getenv
- Copying Files (shutil.copy vs copy2)
- Moving Files and Directories via shutil.move
- Recursive Directory Tree Deletion (rmtree)
- Checking Physical Disk Space Layouts
- Practical Example: Archiving Old Log Files
- Recommended Execution with subprocess.run()
- Capturing Command Output and Error Streams
- Return Code Evaluations and Assertions
- Safe Argument Arrays and Injection Mitigation
- Advanced Process Management via Popen
- Practical Example: Running ping, df, and systemctl
- Reading Command-Line Arguments via argv
- Script Termination with System Exit Codes
- Host Operating System Detection via platform
- Module Lookup Paths and the sys.path Array
- Getting the Current Process ID via getpid
- Signal Module Introduction and Concepts
- Handling SIGINT (Ctrl+C) Gracefully
Chapter 15
- Text Pattern Matching and Bound Concepts
- Regex Power and Advantages Over String Methods
- The re Module Initialization in Python
- Wildcards and Quantifiers (dot, star, plus, ?)
- Boundary Anchors (Caret and Dollar Sign)
- Character Classes (Digits, Words, Whitespace)
- Matching Character Sets Using Brackets
- Negated Character Sets (Caret in Brackets)
- Match at Start vs Search Anywhere
- Finding All Matches (findall vs finditer)
- Substitutions and Replacing Patterns via sub()
- Compiling Reusable Patterns via re.compile()
- Creating Capture Groups Using Parentheses
- Accessing Positional Groups by Group Index
- Named Capture Groups Syntax Layouts
- Practical Example: Extracting Fields from Logs
- Validating IPv4 Address String Formats
- Extracting All IPs from Unstructured Text
- Parsing Structured Logs for Error Entries
- Extracting Interface Names from show interface