Using XML w/ Python...
Rick Wotnaz
desparn at wtf.com
Mon Dec 12 10:39:54 EST 2005
uche.ogbuji at gmail.com wrote in
news:1134372862.503403.26240 at g14g2000cwa.googlegroups.com:
> """
> Spoke too soon, i get this error when running amara in
> ActivePython
>
>>>> import amara
>>>> amara.parse("http://www.digg.com/rss/index.xml")
>
> Traceback (most recent call last):
> File "<interactive input>", line 1, in ?
> File "C:\Python23\Lib\site-packages\amara\__init__.py", line
> 50, in
> parse
> if IsXml(source):
> NameError: global name 'IsXml' is not defined
>
> So im guessing theres an error with one of the files...
> """
>
> IsXml is imported conditionally, so this is an indicator that
> somethign about your module setup is still not agreeing with
> ActivePython. What do you see as the output of:
>
> python -c "import amara; print dir(amara)"
>
> ? I get:
>
> ['InputSource', 'IsXml', 'Uri', 'Uuid', '__builtins__',
> '__doc__', '__file__', '__name__', '__path__', '__version__',
> 'bindery', 'binderytools', 'binderyxpath', 'create_document',
> 'dateutil_standins', 'domtools', 'os', 'parse', 'pushbind',
> 'pushdom', 'pyxml_standins', 'saxtools']
>
Not wanting to hijack this thread, but it got me interested in
installing amara. I downloaded Amara-allinone-1.0.win32-py2.4.exe
and ran it. It professed that the installation directory was to be
D:\Python24\Lib\site-packages\ ... but it placed FT and amara in D:
\Python24\Python24\Lib\site-packages . Possibly the installer is
part of the problem here?
--
rzed
More information about the Python-list
mailing list