Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
# CLASP.Python <!-- omit from toc -->
**C**ommand-**L**ine **A**rgument **S**orting and **P**arsing for Python
**C**ommand-**L**ine **A**rgument **S**orting and **P**arsing, for Python

![Language](https://img.shields.io/badge/Python-3776AB?style=flat&logo=python&logoColor=white)
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
Expand All@@ -17,11 +17,11 @@
- [Components](#components)
- [Examples](#examples)
- [Project Information](#project-information)
- [Where to get help](#where-to-get-help)
- [Contribution guidelines](#contribution-guidelines)
- [Dependencies](#dependencies)
- [Related projects](#related-projects)
- [License](#license)
- [Where to get help](#where-to-get-help)
- [Contribution guidelines](#contribution-guidelines)
- [Dependencies](#dependencies)
- [Related projects](#related-projects)
- [License](#license)


## Introduction
Expand All@@ -37,7 +37,7 @@ Python version.
Install via **pip** or **pip3**, as in:

```
$ pip3 install pyclasp
pip3 install pyclasp
```

Use via **import**:
Expand Down
28 changes: 14 additions & 14 deletions examples/duplicate_aliases.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -50,7 +50,7 @@ else:
If executed with the arguments

```
$ python examples/multiple_options.py --help
python examples/multiple_options.py --help
```

it gives the following output on the standard output stream:
Expand All@@ -60,23 +60,23 @@ USAGE: duplicate_aliases.py [ ... flags and options ... ]

flags/options:

-c
--compile
None
-c
--compile
None

-d
--debug
None
-d
--debug
None

-c
--execute
None
-c
--execute
None

--help
Shows usage and terminates
--help
Shows usage and terminates

--version
Shows version and terminates
--version
Shows version and terminates
```

and it gives the following output on the standard error stream:
Expand Down
46 changes: 23 additions & 23 deletions examples/flag_and_option_specifications.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -87,13 +87,13 @@ if (unused):
If executed with no arguments

```
python examples/flag_and_option_specifications.py
python3 examples/flag_and_option_specifications.py
```

or (in a Unix shell):

```
./examples/flag_and_option_specifications.py
./examples/flag_and_option_specifications.py
```

it gives the output:
Expand All@@ -106,7 +106,7 @@ it gives the output:
If executed with the arguments

```
python examples/flag_and_option_specifications.py --help
python examples/flag_and_option_specifications.py --help
```

it gives the output:
Expand All@@ -120,33 +120,33 @@ USAGE: flag_and_option_specifications.py [ ... flags and options ... ]

flags/options:

-d
--debug
runs in Debug mode
-d
--debug
runs in Debug mode

-c --verbosity=chatty
-v <value>
--verbosity=<value>
specifies the verbosity
where <value> one of:
terse
quiet
silent
chatty
-c --verbosity=chatty
-v <value>
--verbosity=<value>
specifies the verbosity
where <value> one of:
terse
quiet
silent
chatty

--help
Shows usage and terminates
--help
Shows usage and terminates

--version
Shows version and terminates
--version
Shows version and terminates
```

### Specify flags and options in long-form

If executed with the arguments

```
python examples/flag_and_option_specifications.py --debug --verbosity=silent
python examples/flag_and_option_specifications.py --debug --verbosity=silent
```

it gives the output:
Expand All@@ -161,7 +161,7 @@ Debug mode is specified
If executed with the arguments

```
python examples/flag_and_option_specifications.py -v silent -d
python3 examples/flag_and_option_specifications.py -v silent -d
```

it gives the (same) output:
Expand All@@ -176,7 +176,7 @@ Debug mode is specified
If executed with the arguments

```
python examples/flag_and_option_specifications.py -c -d
python3 examples/flag_and_option_specifications.py -c -d
```

it gives the output:
Expand All@@ -191,7 +191,7 @@ Debug mode is specified
If executed with the arguments

```
python examples/flag_and_option_specifications.py -dc
python3 examples/flag_and_option_specifications.py -dc
```

it gives the (same) output:
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple_options.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -86,7 +86,7 @@ if (unused):
If executed with the arguments

```
python examples/multiple_options.py -z -z -e cpp -e cxx -e cxx -z
python3 examples/multiple_options.py -z -z -e cpp -e cxx -e cxx -z
```

it gives the output:
Expand Down
38 changes: 19 additions & 19 deletions examples/sections.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -83,13 +83,13 @@ sys.stdout.write("no flags specified\n");
If executed with no arguments

```
python examples/sections.py
python3 examples/sections.py
```

or (in a Unix shell):

```
./examples/sections.py
./examples/sections.py
```

it gives the output:
Expand All@@ -103,7 +103,7 @@ no flags specified
If executed with the arguments

```
python examples/sections.py --help
python3 examples/sections.py --help
```

it gives the output:
Expand All@@ -117,32 +117,32 @@ USAGE: sections.py [ ... flags and options ... ]

flags/options:

Behaviour:
Behaviour:

-v <value>
--verbosity=<value>
specifies the verbosity
where <value> one of:
terse
quiet
silent
chatty
-v <value>
--verbosity=<value>
specifies the verbosity
where <value> one of:
terse
quiet
silent
chatty

Standard:
Standard:

--help
Shows usage and terminates
--help
Shows usage and terminates

--version
Shows version and terminates
--version
Shows version and terminates
```

### Show version

If executed with the arguments

```
python examples/sections.py --version
python3 examples/sections.py --version
```

it gives the output:
Expand All@@ -156,7 +156,7 @@ sections.py 0.0.1
If executed with the arguments

```
python examples/sections.py --unknown=value
python3 examples/sections.py --unknown=value
```

it gives the output (on the standard error stream):
Expand Down
26 changes: 13 additions & 13 deletions examples/show_usage_and_version.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,10 +24,10 @@ VERSION = [ 0, 0, 2 ]

INFO_LINES = (

'CLASP.Python examples',
':version:',
"Illustrates use of CLASP.Python's clasp.show_usage() and clasp.show_version() methods",
'',
"CLASP.Python examples",
':version:',
"Illustrates use of CLASP.Python's clasp.show_usage() and clasp.show_version() methods",
'',
)

# Specify specifications, parse, and checking standard flags
Expand DownExpand Up@@ -70,13 +70,13 @@ sys.stdout.write("no flags specified\n");
If executed with no arguments

```
python examples/show_usage_and_version.py
python3 examples/show_usage_and_version.py
```

or (in a Unix shell):

```
./examples/show_usage_and_version.py
./examples/show_usage_and_version.py
```

it gives the output:
Expand All@@ -90,7 +90,7 @@ no flags specified
If executed with the arguments

```
python examples/show_usage_and_version.py --help
python3 examples/show_usage_and_version.py --help
```

it gives the output:
Expand All@@ -104,19 +104,19 @@ USAGE: show_usage_and_version.py [ ... flags and options ... ]

flags/options:

--help
Shows usage and terminates
--help
Shows usage and terminates

--version
Shows version and terminates
--version
Shows version and terminates
```

### Show version

If executed with the arguments

```
python examples/show_usage_and_version.py --version
python3 examples/show_usage_and_version.py --version
```

it gives the output:
Expand All@@ -130,7 +130,7 @@ show_usage_and_version.py 0.0.2
If executed with the arguments

```
python examples/show_usage_and_version.py --unknown=value
python3 examples/show_usage_and_version.py --unknown=value
```

it gives the output (on the standard error stream):
Expand Down
Loading
Loading