Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am dmulholland on github.
  • I am dmulholl (https://keybase.io/dmulholl) on keybase.
  • I have a public key ASBTwus0LoggBwIedoUmDOxgX5hAsadq37KdFwCpcdSEmwo

To claim this, I am signing this object:

@dmulholl
dmulholl / gist:a8369ef47775d3f64400526f74d30fb3
Created May 14, 2016 22:44 — forked from datagrok/gist:2199506
Virtualenv's `bin/activate` is Doing It Wrong

Virtualenv's bin/activate is Doing It Wrong

I'm a Python programmer and frequently work with the excellent [virtualenv][] tool by Ian Bicking.

Virtualenv is a great tool on the whole but there is one glaring problem: the activate script that virtualenv provides as a convenience to enable its functionality requires you to source it with your shell to invoke it. The activate script sets some environment variables in your current environment and defines for you a deactivate shell function which will (attempt to) help you to undo those changes later.

This pattern is abhorrently wrong and un-unix-y. activate should instead do what ssh-agent does, and launch a sub-shell or sub-command with a modified environment.

Problems