Re: sgmllib parser keeps old tag data?

2009-02-14 Thread Berend van Berkum
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, Feb 13, 2009 at 03:41:52PM +, MRAB wrote: > Berend van Berkum wrote: > >Yes.. tested that and SGMLParser won't let me override __init__, > >(SGMLParser vars are uninitialized even with sgmllib.SGMLParser(self) &

Re: sgmllib parser keeps old tag data?

2009-02-13 Thread Berend van Berkum
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, Feb 13, 2009 at 02:31:40PM +, MRAB wrote: > Berend van Berkum wrote: > > > >import sgmllib > > > > > >class MyParser(sgmllib.SGMLParser): > > > > content = '' > &g

sgmllib parser keeps old tag data?

2009-02-13 Thread Berend van Berkum
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi everyone, I read the source, made numerous tests, but SGMLParser's keeps returning *tag* data from previous parser instances. I'm totally confused why.. The content data it returns is ok. E.g.:: sp = MyParser() sp.feed('Test') prin

Interactive session, alternating prompt. readline? curses?

2007-03-25 Thread Berend van Berkum
Hi all, I'm looking at building an interactive session in front of some rdfobj instances. I've used cmd and just found code.Interactive*. Protocol doesn't matter, I'm looking at the UI possibilities. History is nice to have and my intention is to write output of the session to stdin/stderr. H