Shell - tmuxp.shell

Utility and helper methods for tmuxp.

tmuxp.shell.has_ipython()
function[source]

Return True if ipython is installed.

Return type:

bool

tmuxp.shell.has_ptpython()
function[source]

Return True if ptpython is installed.

Return type:

bool

tmuxp.shell.has_ptipython()
function[source]

Return True if ptpython + ipython are both installed.

Return type:

bool

tmuxp.shell.has_bpython()
function[source]

Return True if bpython is installed.

Return type:

bool

tmuxp.shell.detect_best_shell()
function[source]

Return the best, most feature-rich shell available.

Return type:

CLIShellLiteral

tmuxp.shell.get_bpython(options, extra_args=None)
function[source]

Return bpython shell.

Parameters:
Return type:

Callable[[], None]

tmuxp.shell.get_ipython_arguments()
function[source]

Return ipython shell args via IPYTHON_ARGUMENTS environment variables.

Return type:

list[str]

tmuxp.shell.get_ipython(options, **extra_args)
function[source]

Return ipython shell.

Parameters:
  • options (LaunchOptionalImports)

  • extra_args (dict[str, Any])

Return type:

Any

tmuxp.shell.get_ptpython(options, vi_mode=False)
function[source]

Return ptpython shell.

Parameters:
  • options (LaunchOptionalImports)

  • vi_mode (bool)

Return type:

Any

tmuxp.shell.get_ptipython(options, vi_mode=False)
function[source]

Based on django-extensions.

Run renamed to launch, get_imported_objects renamed to get_launch_args

Parameters:
  • options (LaunchOptionalImports)

  • vi_mode (bool)

Return type:

Any

tmuxp.shell.get_launch_args(**kwargs)
function[source]

Return tmuxp shell launch arguments, counting for overrides.

Parameters:

kwargs (Unpack[LaunchOptionalImports])

Return type:

LaunchImports

tmuxp.shell.get_code(use_pythonrc, imported_objects)
function[source]

Launch basic python shell via code.

Parameters:
  • use_pythonrc (bool)

  • imported_objects (LaunchImports)

Return type:

Any

tmuxp.shell.launch(shell='best', use_pythonrc=False, use_vi_mode=False, **kwargs)
function[source]

Launch interactive libtmux shell for tmuxp shell.

Parameters:
  • shell (CLIShellLiteral | None)

  • use_pythonrc (bool)

  • use_vi_mode (bool)

  • kwargs (Unpack[LaunchOptionalImports])

Return type:

None