The Book Meme

Posted in Uncategorized on November 12th, 2008 by varikin

Ah, yes: things in the environment can wink out of existence as well–newtorks, files’[sic] URLs, license keys, users, printers–you name it.

Pragmatic Unit Testing

  • Grab the nearest book.
  • Open it to page 56.
  • Find the fifth sentence.
  • Post the text of the sentence in your journal along with these instructions.
  • Don’t dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST.

A nasty bug in virtualenvwrapper

Posted in Uncategorized on November 6th, 2008 by varikin

WARNING: DO NOT REPRODUCE THIS BUG WITHOUT REALIZING THE CONSEQUENCES!

I recently had a good need for using virtualenv due working on multiple Django projects.  With that, I decided to use virtualenvwrapper as well. I absolutely love these too programs since they make managing different environments extremely easy. Virtualenv provides a great sandbox area where I can install all the python packages a want without messing up any other environment. Virtualenvwrapper provides some commands to easily work with multiple virtualenvs.

While first testing virtualenvwrapper, I created several virtualenvs, switched to different ones, and then tried deleting one. Then I found the nastiest of bug. If no arguments are given to rmvirtualenv, it deletes $WORKON_HOME and all environments.

I am bad a running a command without the arguments and I really don’t want to lose everything. I am just glad I found this before actually putting real stuff in any enviroments.

I updated virtualenvwrapper to print an error message instead of deleting everything and emailed it to Doug Hellmann, the creator of virtualenvwrapper. He said he will put out a new version this weekend.

Other than this issue, I love virtualenv and virtualenvwrapper.