[New-bugs-announce] [issue18479] Improvements to Powershell activate script for venv

Paul Moore report at bugs.python.org
Wed Jul 17 12:11:08 CEST 2013


New submission from Paul Moore:

Some small improvements to the powershell "Activate" script for venvs:

1. Can be run as a command, rather than needing to be dot sourced. This matches the behaviour of bat files, and of virtualenv's "activate" script, and avoids a source of user error.

2. Makes the "deactivate" command a function, so that a separate script is not needed, and deactivate can still be run after the environment has been deleted (a common error I make is to remove a temporary venv having forgotten to deactivate it first).

3. Corrects the prompt to have a prefix (name) rather than [(name) ]. This is likely a bug in venv itself, as __VENV_NAME__ is documented as being just the name, not the prompt string. But changing that could be a backward compatibility issue, so I'd prefer to put that in a separate patch if it's needed.

These modifications are based on the virtualenv activate.ps1 script, which has been in use for some time, so they should be relatively well tested.

----------
assignee: vinay.sajip
components: Library (Lib)
files: venv.diff
keywords: patch
messages: 193217
nosy: pmoore, vinay.sajip
priority: normal
severity: normal
stage: patch review
status: open
title: Improvements to Powershell activate script for venv
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file30946/venv.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18479>
_______________________________________


More information about the New-bugs-announce mailing list