Skip to main content

Parse shebangs and return their components.

Project description

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

AppVeyor

Coveralls

PyPIVersionPyPIPythons

License

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

Uploaded Source

File details

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

File metadata

File hashes

Hashes for parse-shebang-0.0.14.tar.gz
Algorithm Hash digest
SHA256 383593d529321829856e07d3036e02dcd6205ff25634e8b23b26464a920a6db0
MD5 f48593829bb5871090475d64824c575b
BLAKE2b-256 b70133b414f576edc3ac79d3c16646695043b836bbdc8efac667acdbcf557db9

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