Editted Argument Passing Wikilink
This commit is contained in:
parent
19a6297fce
commit
7c16496a9a
2 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
## What is it?
|
||||
Argument passing refers to how Python processes the script name and additional arguments provided during execution. These are stored as a list of strings in the `argv` variable within the `sys` module. This is a sub concept of [[Invoking the Python Interpreter]].
|
||||
Argument passing refers to how Python processes the script name and additional arguments provided during execution. These are stored as a list of strings in the `argv` variable within the `sys` module. This is a sub concept of .
|
||||
## How to Use It:
|
||||
1. **Behavior of `sys.argv`**:
|
||||
- The script name and additional arguments are stored in `sys.argv` as a list of strings.
|
||||
|
|
|
@ -32,7 +32,7 @@ The Python interpreter is a program that executes Python code. It can be run int
|
|||
- **Interactive Mode**: Reads and executes commands interactively when standard input is connected to a tty device. See [[Interactive Mode]] for details.
|
||||
- **Script Mode**: Executes a script when a file name is provided as an argument or via standard input.
|
||||
2. **Command-Line Options**:
|
||||
- **`-c command [arg] ...`**: Executes the specified statements in the command string. For details on passing arguments, see [[Argument Passing]].
|
||||
- **`-c command [arg] ...`**: Executes the specified statements in the command string. For details on passing arguments, see [Argument Passing](./argument-passing.md).
|
||||
- **`-m module [arg] ...`**: Executes a module as a script by its full name.
|
||||
- **`-i`**: Runs a script and then enters interactive mode.
|
||||
## References:
|
||||
|
|
Loading…
Reference in a new issue