Parse shebangs and return their components.
Project description
# Parse Shebang
Parse shebangs so script-like files can be executed directly on Windows
On Windows, scripts are supposed to be registered with with their
interpreters and placed into PATHEXT, but that information might not
be available and the script still needs to be run. In that case, this
module is useful, because it looks up the required information to run the
script as best as possible.
## Status
| Travis CI (Ubuntu) | AppVeyor (Windows) | Coverage | PyPI | Licence |
|--------------------|--------------------|----------|------|---------|
|[![Travis](https://img.shields.io/travis/polysquare/python-parse-shebang.svg)](http://travis-ci.org/polysquare/python-parse-shebang)|[![AppVeyor](https://img.shields.io/appveyor/ci/smspillaz/python-parse-shebang.svg)](https://ci.appveyor.com/project/smspillaz/python-parse-shebang)|[![Coveralls](https://img.shields.io/coveralls/polysquare/python-parse-shebang.svg)](http://coveralls.io/polysquare/python-parse-shebang)|[![PyPIVersion](https://img.shields.io/pypi/v/parse-shebang.svg)](https://pypi.python.org/pypi/parse-shebang)[![PyPIPythons](https://img.shields.io/pypi/pyversions/parse-shebang.svg)](https://pypi.python.org/pypi/parse-shebang)|[![License](https://img.shields.io/github/license/polysquare/python-parse-shebang.svg)](http://github.com/polysquare/python-parse-shebang)|
## API Usage
shebang = parseshebang.parse(file_to_parse)
subprocess.check_call(shebang + ["/my_script.py"])
`file_to_parse` may be either an open file object, which supports seeking,
or a file name. A list containing the shebang components is returned.
Parse shebangs so script-like files can be executed directly on Windows
On Windows, scripts are supposed to be registered with with their
interpreters and placed into PATHEXT, but that information might not
be available and the script still needs to be run. In that case, this
module is useful, because it looks up the required information to run the
script as best as possible.
## Status
| Travis CI (Ubuntu) | AppVeyor (Windows) | Coverage | PyPI | Licence |
|--------------------|--------------------|----------|------|---------|
|[![Travis](https://img.shields.io/travis/polysquare/python-parse-shebang.svg)](http://travis-ci.org/polysquare/python-parse-shebang)|[![AppVeyor](https://img.shields.io/appveyor/ci/smspillaz/python-parse-shebang.svg)](https://ci.appveyor.com/project/smspillaz/python-parse-shebang)|[![Coveralls](https://img.shields.io/coveralls/polysquare/python-parse-shebang.svg)](http://coveralls.io/polysquare/python-parse-shebang)|[![PyPIVersion](https://img.shields.io/pypi/v/parse-shebang.svg)](https://pypi.python.org/pypi/parse-shebang)[![PyPIPythons](https://img.shields.io/pypi/pyversions/parse-shebang.svg)](https://pypi.python.org/pypi/parse-shebang)|[![License](https://img.shields.io/github/license/polysquare/python-parse-shebang.svg)](http://github.com/polysquare/python-parse-shebang)|
## API Usage
shebang = parseshebang.parse(file_to_parse)
subprocess.check_call(shebang + ["/my_script.py"])
`file_to_parse` may be either an open file object, which supports seeking,
or a file name. A list containing the shebang components is returned.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
parse-shebang-0.0.22.tar.gz
(4.3 kB
view details)
File details
Details for the file parse-shebang-0.0.22.tar.gz
.
File metadata
- Download URL: parse-shebang-0.0.22.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79b83e0d3551a76975cb2110165a01bdd4ab18d220114e8492199adb8cdb8869 |
|
MD5 | 30ad22c01c0acc5dfde290e809d6ea19 |
|
BLAKE2b-256 | 89bd18b3be2cc15622f97853f25e547467e5ab9064521697cad8ba0677fcf345 |