ipython shell, workingenv and instancemanagerΒΆ

Tags: instancemanager, sorrentosprint2007, plone

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.

(Old imported comments)
"iudrpohb" by iudrpohb on 2007-08-23 23:40:44
[URL=http://tmhogkeb.com]ttuucygi[/URL] qwxcgtuj http://vpqktiyc.com neyybvhk qfyyvzwp <a href="http://tuhrsptz.com">oytdzxdg</a>
"easy_install ipython" by Daniel Nouri on 2007-04-04 00:59:42
Instead of downloading and extracting the tarball, you can simply call

$ easy_install ipython
 
vanrees.org logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):