Project Description
Simple utility to execute linux egrep command. The intention is to extend the capability of the egrep command from linux to python.
Repo
If you wish to add aditional features to the command take a look at: https://github.com/rhimmelbauer/egrep
Runtime
It has only been tested with Python3.6 onwards. This package will only work in linux OS that have the egrep command.
Example
You must at least pass 2 variables when constructing an egrep instance. 1. Should be the regex expression and the second should be the filepath as a string. If you wish to add command options you can add them as initial parameter. Make sure the the second to last is the regex expression and the last is the filepath.
# No option
egrepInstance = egrep("'\d+'","directory.txt")
egrepInstance.execute()
print(egrepInstance.expressionsFound)
# Must match whole expression.
egrepInstance = egrep("-w","'\d+'","directory.txt")
egrepInstance.execute()
print(egrepInstance.expressionsFound)
Methods & Properties:
At least 2 arguments:
- The regex expresion as a String with single quotes eg: "'[agxc].A'".
- The filepath as a string eg: "testfile.txt"
- Any egrep command. Make sure the are at the beiging eg: "-w","regex","filepath"
def __init__(*args)
The constructor will validate if the file existis. If it does not it will through a egrepError.
To execute the egrep use the execute method were it will store the result in the property expressionsFound, which is a list.
Metadata
Release files for egrep 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| egrep-0.1.1.tar.gz | 2.6 kB | Without provenance | Details for egrep-0.1.1.tar.gz |
Release files / egrep-0.1.1.tar.gz
| Download URL | egrep-0.1.1.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63710b2956060f0d49b7e5ad9f6463ef031946da8f3f5e587a7eb572265405d6
|
|
BLAKE2b-256 checksum How to use checksums |
e4905649b44b448bbe179a2909dd134bb80afe752c5d7a2896ddbcfb283c9307
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6
|
Security for egrep 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.