Personal tools
You are here: Home Reinout van Rees' weblog ipython shell, workingenv and instancemanager

ipython shell, workingenv and instancemanager

by Reinout van Rees — last modified Oct 08, 2007 05:59 PM

The ipython demonstration was quite impressive, but doing the activation and so by hand... That's what instancemanager is for.

Stefan showed off ipython on saturday. Pretty impressive. I've now added support for this in instancemanager.

BeerBook and Rob's finger torture device

Without workingenv (some info on Daniel's blog), ipython is harder to use. ipython needs to be started with the same python that your zope uses, so installing it globally eventually only gives you one ipython on your path. If you setup your zope as a workingenv, all python libraries you install are installed local to your zope. Also the ipython binary.

Workingenv in instancemanager: add a `use_workingenv = True' to your project's config file. An instancemanager PROJECTNAME fresh sets up your zope instance for workingenv. If your instance already exists: instancemanager PROJECTNAME --upgradezope fixes it up without destroying anything.

The workingenv is activated automatically when you start/stop/whatever zope. Also ipython is run with the workingenv activated. If you need to activate it yourself: do it by hand. instancemanager PROJECTNAME --activate prints out the line you have to paste in your shell (by nature, it can't be set from instancemanager itself).

Installing ipython should be easy if you've got instancemanager installed, as instancemanager requires setuptools to be installed itself :-) There are no other dependencies.

  • Download ipython from http://ipython.scipy.org/ and extract the tarball.
  • Activate the workingenv: instancemanager PROJECTNAME --activate. This places the correct easy_install right in front in your path.
  • easy_install /directory/where/you/extracted/ipython.
  • Download ipy_profile_zope.py and place it in your ~/.ipython directory (ah, run ipython once beforehand to get that directory).

If you want, you can type deactivate to deactivate your workingenv. Depends on how you use that. It is pretty new to me, so I'm still figuring out the handiest way to work with it.

Running ipython is real easy: instancemanager PROJECTNAME --ipython.

There are possible improvements, but it already seems to work pretty well.

Document Actions

easy_install ipython

Posted by Daniel Nouri at Apr 04, 2007 12:59 AM
Instead of downloading and extracting the tarball, you can simply call

$ easy_install ipython

iudrpohb

Posted by iudrpohb at Aug 23, 2007 11:40 PM
[URL=http://tmhogkeb.com]ttuucygi[/URL] qwxcgtuj http://vpqktiyc.com neyybvhk qfyyvzwp <a href="http://tuhrsptz.com">oytdzxdg</a>