Using Rope or Ropemacs with Python Virtualenv

    _   _              _    ___  _            _     _                  _
   /_\ | |_ __  ___ __| |_ / _ \| |__ ___ ___| |___| |_ ___   _ _  ___| |_
  / _ \| | '  \/ _ (_-<  _| (_) | '_ (_-</ _ \ / -_)  _/ -_)_| ' \/ -_)  _|
 /_/ \_\_|_|_|_xxxx/__/xxx|xxxx/|_.__/__/xxxx/_xxxx|xxx\___\___|\__|
                                                   In Glorious ASCII-VISION
Home

2011-04-17 Sun Using Rope or Ropemacs with Python Virtualenv

To make Rope use the libraries in your virtualenv: edit config.py in the .ropeproject directory (in the Rope project you want to set this up for) and add the following lines at the top of the "set_prefs" function:

VIRTUAL_ENV = "/home/yourname/envs/envname/"
ACTIVATE_FILE = VIRTUAL_ENV + "bin/activate_this.py"
execfile(ACTIVATE_FILE, dict(__file__=ACTIVATE_FILE))

Simple :)

 __________________
< made in Org-mode >
 ------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                |   | ----w |
                 ||     ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Date: 2011-08-07 11:20:42 BST

Author: Thomas Parslow

Org version 7.5 with Emacs version 23

Validate XHTML 1.0