Skip to content

Consider adding PYTHONSTARTUP with shell integration to environment variable collection #23930

Closed

Description

Currently opening the REPL will open the default shell with a custom environment:

this.terminal = this.terminalManager.createTerminal({
name: this.options?.title || 'Python',
env: { PYTHONSTARTUP: this.envVarScript },
hideFromUser: this.options?.hideFromUser,
});

And then run & .../python3 to launch it as a sub-shell:

Screenshot 2024-08-08 at 9 05 14 AM

Why not set the environment variable globally such that any python sub-shell will have shell integration? Adding this to my pwsh profile works:

$env:PYTHONSTARTUP = "/Users/tyriar/.vscode-insiders/extensions/ms-python.python-2024.13.2024080701-darwin-arm64/python_files/pythonrc.py"
Screenshot 2024-08-08 at 9 06 05 AM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions