Re: unescape HTML entities

2006-11-02 Thread Frederic Rentsch
Rares Vernica wrote: > Hi, > > I downloades 2.2 beta, just to be sure I have the same version as you > specify. (The file names are no longer funny.) Anyway, it does not seem > to do as you said: > > In [14]: import SE > > In [15]: SE.version > ---> SE.version() > Out[15]: 'SE 2.2 beta - SEL

Re: unescape HTML entities

2006-11-02 Thread Frederic Rentsch
Rares Vernica wrote: > Hi, > > Nice module! > > I downloaded 2.3 and I started to play with it. The file names have > funny names, they are all caps, including extension. > > For example the main module file is "SE.PY". Is you try "import SE" it > will not work as Python expects the file extensio

Re: unescape HTML entities

2006-11-01 Thread Rares Vernica
Hi, I downloades 2.2 beta, just to be sure I have the same version as you specify. (The file names are no longer funny.) Anyway, it does not seem to do as you said: In [14]: import SE In [15]: SE.version ---> SE.version() Out[15]: 'SE 2.2 beta - SEL 2.2 beta' In [16]: HTM_Decoder = SE.SE

Re: unescape HTML entities

2006-11-01 Thread Rares Vernica
Hi, Nice module! I downloaded 2.3 and I started to play with it. The file names have funny names, they are all caps, including extension. For example the main module file is "SE.PY". Is you try "import SE" it will not work as Python expects the file extension to be "py". Thanks, Ray Frederic

Re: Unescape HTML entities

2006-10-31 Thread Klaus Alexander Seistrup
Rares Vernica wrote: > How does your code deal with ' like entities? It doesn't, it deals with named entities only. But take a look at Fredrik's example. Cheers, -- Klaus Alexander Seistrup København, Danmark, EU http://klaus.seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-l

Re: unescape HTML entities

2006-10-31 Thread Rares Vernica
Hi, How does your code deal with ' like entities? Thanks, Ray Klaus Alexander Seistrup wrote: > Rares Vernica wrote: > >> How can I unescape HTML entities like " "? >> >> I know about xml.sax.saxutils.unescape() but it only deals with >> "&", "<", and ">". >> >> Also, I know about htmlentitydef

Re: unescape HTML entities

2006-10-30 Thread Rares Vernica
Thanks a lot for all the answers! Ray Frederic Rentsch wrote: > Rares Vernica wrote: >> Hi, >> >> How can I unescape HTML entities like " "? >> >> I know about xml.sax.saxutils.unescape() but it only deals with "&", >> "<", and ">". >> >> Also, I know about htmlentitydefs.entitydefs, but not only

Re: unescape HTML entities

2006-10-29 Thread Frederic Rentsch
Rares Vernica wrote: > Hi, > > How can I unescape HTML entities like " "? > > I know about xml.sax.saxutils.unescape() but it only deals with "&", > "<", and ">". > > Also, I know about htmlentitydefs.entitydefs, but not only this > dictionary is the opposite of what I need, it does not have " ".

Re: unescape HTML entities

2006-10-28 Thread Fredrik Lundh
Rares Vernica wrote: > How can I unescape HTML entities like " "? run it through an HTML parser. or use something like this: http://effbot.org/zone/re-sub.htm#strip-html (if you want to keep elements, change the regular expression in the re.sub call to "(?s)&#?\w+;") > I know about xml.

Re: unescape HTML entities

2006-10-28 Thread Klaus Alexander Seistrup
Rares Vernica wrote: > How can I unescape HTML entities like " "? > > I know about xml.sax.saxutils.unescape() but it only deals with > "&", "<", and ">". > > Also, I know about htmlentitydefs.entitydefs, but not only this > dictionary is the opposite of what I need, it does not have > " ". How

Re: unescape HTML entities

2006-10-28 Thread Jim
Rares Vernica wrote: > How can I unescape HTML entities like " "? Can I ask what you mean by "unescaping"? Do you mean converting into numeric references? Into Unicode? Jim -- http://mail.python.org/mailman/listinfo/python-list