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.

Filename, size & hash SHA256 hash help File type Python version Upload date
shellingham-1.2.4-py2.py3-none-any.whl (10.6 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Jul 27, 2018
shellingham-1.2.4.tar.gz (6.0 kB) Copy SHA256 hash SHA256 Source None Jul 27, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page