Skip to main content

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.

Project details


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.21.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file parse-shebang-0.0.21.tar.gz.

File metadata

File hashes

Hashes for parse-shebang-0.0.21.tar.gz
Algorithm Hash digest
SHA256 aaab4d977d525a2b118c91b9af83938d5f82ad0182f46e5618021351e4701b73
MD5 e3847ef77a1625a4db5cc6bd7d0253b0
BLAKE2b-256 17ad78c9ddb8861ddbd58e7891d3a33cc3354957d753b55a91dbfca521c68284

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page