[IPython-dev] ipipe news

Ville Vainio vivainio at gmail.com
Wed Mar 1 05:54:10 CST 2006


On 3/1/06, Arnd Baecker <arnd.baecker at web.de> wrote:

> Should it also work from a normal python prompt?
>
> For this I get:
> >>> from ipipe import *
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "ipipe.py", line 246
>     return (XAttr(item, name) for name in xattrs(item, mode))
>                                 ^
> SyntaxError: invalid syntax
>
> Converting this to
>     return [XAttr(item, name) for name in xattrs(item, mode)]
> shows another problem in l. 292

Yeah, we're trying to avoid 2.4 syntax where applicable. I can see why
this can be a problem when you want generators though... you'd have to
implement a custom generator instead of genexp.

One extra problem:

when curses in not available (which is the case on win32), I get

[environmentswitch]|1> from ipipe import *
---------------------------------------------------------------------------
exceptions.AttributeError                            Traceback (most recent call
 last)

C:\opt\environmentswitch\<ipython console>

AttributeError: 'module' object has no attribute 'ibrowse'
[environmentswitch]|2>

The import should also work without curses.

Once these problems are fixed (and the indentation is converted to 4
spaces), I have no issues shipping this in IPython/Extensions.

--
Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'




More information about the IPython-dev mailing list