# Evaluate in a workspace

Source: https://libtmux.org/en/py/stable/workspace/cli/shell/

> Use the optional Python runtime to inspect a workspace through the native command.

Open a Python shell with tmux objects available, or pass `-c` to evaluate a
Python expression and exit.

After the [installation walkthrough](https://libtmux.org/en/py/stable/workspace/guides/installation/) creates its
dedicated server:

```console
$ tmuxp shell \
    -L workspace-guide \
    -c 'print(server.sessions)'
```

Optional session and window arguments select a narrower context. `--best`
chooses an available backend; explicit backends such as `--ipython` need their
packages installed in the same Python environment.

`--use-pythonrc` and `--no-startup` control startup loading. The last occurrence
wins. `--use-vi-mode` and `--no-vi-mode` follow the same ordering rule.

[Command source](https://github.com/tmux-python/tmuxp/blob/618b398acc05506d3c682906c36cdeb29dcfa1ff/src/tmuxp/cli/shell.py).
