[IPython-user] Trouble with Robert Kern's Example
Fernando.Perez at colorado.edu
Tue Jan 24 23:57:56 CST 2006
Travis E. Oliphant wrote:
> Using IPython 0.7.0 I'm getting the following error:
Sorry Travis: please upgrade to 0.7.1, which I released yesterday with a fix
for this bug and many more. 0.7.0 had a TON of new code in it, with the
inevitable bugs. Here:
you'll find the necessary downloads.
As for your profile, it's perfectly correct, though I should have perhaps
recommended using instead:
execute import time
execute __cmd = '/home/oliphant/Classes/ee771/logfiles/%s.py rotate'
execute ipmagic('logstart %s' % (__cmd % time.strftime('%Y-%m-%d')))
The two changes here:
1. I'd use a .py extension for the logs, since they are valid python after
all. That way, when you open them in an editor, you get proper syntax
coloring and indentation.
2. The ipmagic function is stored in the builtins by ipython, and is a cleaner
way of calling any magic (and more future-proof than __IP access). Similarly,
there are ipalias() and ipsystem().
Sorry for the delay in this reply: I started writing it earlier, but had to
stop for a while.
More information about the IPython-user