ooopy: newbie cannot get basic functionality to work

Andrew Sackville-West andrew at farwestbilliards.com
Sun Dec 10 01:06:57 EST 2006


On Sat, Dec 09, 2006 at 09:30:32PM -0800, John Machin wrote:
> 
> Andrew Sackville-West wrote:
> >
> > >>> o = OOoPy (infile='/home/andrew/monthly.ods')
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in ?
> > TypeError: 'module' object is not callable
> > >>>
> 
> OK, so that tells you that ooopy.OOoPy is a *module*, and it contains
> *another* gizmoid named OOoPy.

ah ha! I knew it was something fundamental. its those technical terms
that throw me ;-) (gizmoid).
> 
> [snip]
> > >>> sys.modules
> [snip]
> > 'ooopy.OOoPy': <module 'ooopy.OOoPy' from
> > '/usr/lib/python2.4/ooopy/OOoPy.py'>,
> 
> Uh-huh. Confirmation that ooopy.OOoPy is a module.
> 
> Try:
> 
> from ooopy import OOoPy
> o = OOoPy.OOoPy(infile='/home/andrew/monthly.ods')
> 
> BTW, is that package being maintained? Did you ask the maintainer? Any
> response?
> 

I wondered about that when I was looking at it. It was last updated
about a year ago which isn't bad as far as some projects go... heh. No
I didn't go after the maintainer. I'm also looking at maybe using
ElementTree directly as ooopy is a pretty thin wrapper anyway. 

anyway, thanks for the help. I can now do fun things like for n in
o.getiterator(): and so forth.

A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20061209/620d28cb/attachment.sig>


More information about the Python-list mailing list