Tag

argparse

0 views collected around this technical thread.

Python Programming Learning Circle
Python Programming Learning Circle
Apr 25, 2025 · Fundamentals

Using Python argparse for Command‑Line Argument Parsing

This article introduces Python's built‑in argparse module, explains its core features such as defining positional and optional arguments, type constraints, mutually exclusive groups, sub‑parsers, and best‑practice tips, and provides a complete runnable example for building robust CLI tools.

Tutorialargparsecli
0 likes · 5 min read
Using Python argparse for Command‑Line Argument Parsing
Test Development Learning Exchange
Test Development Learning Exchange
Feb 9, 2025 · Fundamentals

Using Python's argparse Module: Basics, Examples, and Advanced Features

This article introduces Python's built‑in argparse module, explains how to create an ArgumentParser, add positional and optional arguments, set types, defaults, mutually exclusive groups, sub‑commands, and demonstrates running scripts with various command‑line options.

Code ExampleParsingTutorial
0 likes · 4 min read
Using Python's argparse Module: Basics, Examples, and Advanced Features
Test Development Learning Exchange
Test Development Learning Exchange
Aug 3, 2024 · Fundamentals

Using Python sys, argparse, and logging Modules

This article demonstrates how to use Python's sys module to access interpreter information, argparse for parsing command‑line arguments, and logging for flexible log handling, providing clear code examples for each feature.

Pythonargparsecommand line
0 likes · 8 min read
Using Python sys, argparse, and logging Modules
Test Development Learning Exchange
Test Development Learning Exchange
Jun 7, 2024 · Fundamentals

Understanding argparse in Python

argparse is a standard Python library for creating user-friendly command-line interfaces, allowing you to define parameters and options, generate help messages, and parse input with error handling.

PythonTutorialargparse
0 likes · 5 min read
Understanding argparse in Python
Python Programming Learning Circle
Python Programming Learning Circle
Apr 12, 2024 · Backend Development

Using argcomplete to Add Auto-Completion for Python and pip Commands

This article explains how to install and configure the argcomplete library to provide tab‑completion for Python, pip, and other argparse‑based command‑line tools, including code snippets and tips for integrating the feature into your own Python packages.

Pythonargcompleteargparse
0 likes · 4 min read
Using argcomplete to Add Auto-Completion for Python and pip Commands
Python Programming Learning Circle
Python Programming Learning Circle
Feb 3, 2024 · Fundamentals

Useful Python Standard Library Modules and Their Practical Uses

This article introduces several lesser‑known but highly practical Python standard‑library modules—including collections, datetime, random, itertools, csv, os, pickle, argparse, and unittest—explaining their core classes and functions with clear code examples and common application scenarios.

CSVCollectionsDateTime
0 likes · 9 min read
Useful Python Standard Library Modules and Their Practical Uses
Python Programming Learning Circle
Python Programming Learning Circle
Aug 12, 2022 · Backend Development

Using the Python Fire Library to Build Simple Command-Line Interfaces

This article explains why the Fire library is a superior alternative to argparse and Click for creating Python command-line tools, demonstrates its installation, provides multiple usage patterns—including exposing functions, classes, and dictionaries as CLIs—and showcases advanced features such as command grouping, attribute access, and custom argument handling.

argparseautomationcli
0 likes · 10 min read
Using the Python Fire Library to Build Simple Command-Line Interfaces
Python Programming Learning Circle
Python Programming Learning Circle
Aug 8, 2022 · Backend Development

Designing Robust Python Command-Line Interfaces with Click, argparse, and sys.argv

This article teaches Python developers how to build maintainable command‑line tools by applying four design principles, illustrating them with a Caesar‑cipher example implemented via sys.argv, argparse, and the Click library, and showing advanced features like file I/O, progress bars, and automated key breaking.

Encryptionargparsecaesar-cipher
0 likes · 10 min read
Designing Robust Python Command-Line Interfaces with Click, argparse, and sys.argv