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 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 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.3.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

shellingham-1.2.3-py2.py3-none-any.whl (10.3 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