Module Contents



valid_shells = ['bash', 'sh', 'zsh', 'csh', 'tcsh', '/bin/bash', '/bin/csh', '/bin/sh', '/bin/tcsh',...

Return repr(self).


Return str(self).


Return shell attributes as a dictionary

property opts(self)

retrieve the shell opts that are set on init, and updated with setter

property path(self)

This method returns the full path to shell program using shutil.which() If shell program is not found we raise an exception. The shebang is is updated assuming path is valid which is just adding character ‘#!’ in front of path. The return is full path to shell program. This method automatically updates the shell path when there is a change in attribute

>>> shell = Shell("bash")
>>> shell.path
>>> shell.path