Skip to main content

Tool to Detect Surrounding Shell

Project description

Shellingham detects what shell the current Python executable is running in.

Usage

>>> import shellingham
>>> shellingham.detect_shell()
('bash', '/bin/bash')

detect_shell pokes around the process’s running environment to determine what shell it is run in. It returns a 2-tuple:

  • The executable name (without extension on Windows), always lowercased.

  • The command used to run the shell.

ShellDetectionFailure is raised if detect_shell fails to detect the surrounding shell.

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

shellingham-1.2.4.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

shellingham-1.2.4-py2.py3-none-any.whl (10.6 kB view hashes)

Uploaded Python 2 Python 3

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