POSIX Parameter Expansion
This is an experiment to create a Python library to enable POSIX parameter expansion from a string.
Obvious Test Cases
>>> from parameter_expansion import expand
>>> foo = 'abc/123-def.ghi'
>>> # Bland Expansion
>>> expand('abc $foo abc')
'abc abc/123-def.ghi abc'
>>> expand('abc${foo}abc')
'abcabc/123-def.ghiabc'
>>>
>>> # Default Value Expansion
>>> expand('-${foo:-bar}-')
'-abc/123-def.ghi-'
>>> expand('-${bar:-bar}-')
'-bar-'
Default Value Expansion
>>> foo = 'abc/123-def.ghi'
>>> expand('abc $foo abc')
'abc abc/123-def.ghi abc'
>>> expand('abc${foo}abc')
'abcabc/123-def.ghiabc'
Release files for parameter-expansion 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| parameter-expansion-0.2.0.tar.gz | 9.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| parameter_expansion-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.5 kB
Release files / parameter-expansion-0.2.0.tar.gz
| Download URL | parameter-expansion-0.2.0.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ec886a657d3ee49e40d68574b1a5390318071b0c7208daf9f1143eee26511ab
|
|
BLAKE2b-256 checksum How to use checksums |
4ff3f629b31fdac9ffd7c79339eac22f0449a42e6ea53e57bea019806e2be177
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.9.0 Darwin/20.5.0
|
Release files / parameter_expansion-0.2.0-py3-none-any.whl
| Download URL | parameter_expansion-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40d33a6e892dca848ccb930167acec45859fe6965dd1058493e174ddcd8496ae
|
|
BLAKE2b-256 checksum How to use checksums |
e799977fb7a03ba78d64de658707df1c52df8d85a965208ae5a80a5a3d4c6c3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.9.0 Darwin/20.5.0
|