[IPython-user] Trouble with Robert Kern's Example
Travis E. Oliphant
oliphant.travis at ieee.org
Tue Jan 24 17:14:41 CST 2006
Travis E. Oliphant wrote:
> Using IPython 0.7.0 I'm getting the following error:
>
> home/oliphant/<string>
>
> /usr/lib/python2.4/site-packages/IPython/Magic.py in
> magic_logstart(self, parameter_s)
> 984
> 985 rc = self.shell.rc
> --> 986 logger = self.shell.logger
> 987
> 988 # if no args are given, the defaults set in the logger
> constructor by
>
> AttributeError: 'MatplotlibShell' object has no attribute 'logger'
> WARNING: Failure executing code: "__IPYTHON__.magic_logstart(__cmd %
> time.strftime('%Y-%m-%d'))"
>
> when I run
>
> ipython -pylab -profile ee771
>
> where
>
> ipythonrc-ee771 is
>
> include ipythonrc
> logfile ''
> execute import time
> execute __cmd = '/home/oliphant/Classes/ee771/logfiles/%s.log rotate'
> execute __IPYTHON__.magic_logstart(__cmd % time.strftime('%Y-%m-%d'))
>
> (Same error with _IP.magic_logstart...)
>
> Is this example supposed to work? What am I doing wrong?
>
>
> What is the recommended way to put magic commands in your profile?
Well, I just checked out the SVN version of IPython and now it works.
Great...
-Travis
More information about the IPython-user
mailing list