[Zope] Fighting htmllib in external method

Jason Spisak 444@hiretechs.com
Tue, 10 Oct 2000 13:31:43 GMT


Dieter:

Thanks Dieter.

> Jason Spisak writes:
>  > I want to catalog some html files but I want to strip the html tags out.
>  > htmlparser does a good job of that, but when I try to acces that from an
>  > external method, I run into trouble.
> You may look at
> 
> 	URL:http://www.dieter.handshake.de/pyprojects/zope/CatalogSupport.html
> 
> It does the same as you want to do, but without the "formatter".
> 
> Alternatively, you may try a "StringIO" instance as a file object.
> 

That's what I ended up doing.

> Finally, I can use files in external methods.
> You should, however, be careful as several threads can execute
> the same external method concurrently. Therefore, your
> files are better not global.

That's what I was thinking.
I'll stay away from a named file.

All my best,


Jason Spisak