Re: Convert xml symbol notation

2007-04-07 Thread dumbkiwi
On Apr 7, 5:23 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: dumbkiwi wrote: I'm working on a script to download and parse a web page, and it includes xml symbol notation, such as #39; for the ' character. Does anyone know of a pre-existing python script/lib to convert the xml notation

Convert xml symbol notation

2007-04-06 Thread dumbkiwi
Hi, I'm working on a script to download and parse a web page, and it includes xml symbol notation, such as #39; for the ' character. Does anyone know of a pre-existing python script/lib to convert the xml notation back to the actual symbol it represents? --

Re: urllib2 hangs forever where there is no network interface

2007-02-01 Thread dumbkiwi
On Feb 2, 5:02 am, [EMAIL PROTECTED] (John J. Lee) wrote: dumbkiwi [EMAIL PROTECTED] writes: I have written a script that uses the urllib2 module to download web pages for parsing. If there is no network interface, urllib2 hangs for a very long time before it raises an exception. I have

urllib2 hangs forever where there is no network interface

2007-01-31 Thread dumbkiwi
I have written a script that uses the urllib2 module to download web pages for parsing. If there is no network interface, urllib2 hangs for a very long time before it raises an exception. I have set the socket timeout with socket.setdefaulttimeout(), however, where there is no network interface,

unicode and os.system

2005-09-02 Thread Dumbkiwi
I've got a rather large python script that I write and maintain. It has some interaction with other programmes on the linux/kde desktop through the dcop interface. This script also uses the gettext module to enable the output of the script to be translated into several languages, including utf-8

Re: unicode and os.system

2005-09-02 Thread Dumbkiwi
On Fri, 02 Sep 2005 16:11:48 -0700, Erik Max Francis wrote: Dumbkiwi wrote: Can anyone help me to work through this issue? I'm a bit lost as to where to start. If you want to convert it to UTF-8, then do so with u.decode('utf-8') I've tried that previously, and get: Traceback

kdialog and unicode

2005-04-26 Thread Dumbkiwi
I'm trying to get python, unicode and kdialog to play nicely together. This is a linux machine, and kdialog is a way to generate dialog boxes in kde with which users can interact (for example input text), and you can use the outputted text in your script. Anyway, what I'm doing is reading from a

Re: kdialog and unicode

2005-04-26 Thread Dumbkiwi
On Tue, 26 Apr 2005 11:41:01 +0200, Peter Otten wrote: Dumbkiwi wrote: I'm trying to get python, unicode and kdialog to play nicely together. This is a linux machine, and kdialog is a way to generate dialog boxes in kde with which users can interact (for example input text), and you can

Re: kdialog and unicode

2005-04-26 Thread dumbkiwi
Peter Otten [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Dumbkiwi wrote: Just encode the data in the target encoding before passing it to os.popen(): test = os.popen('kdialog --inputbox %s' % data.encode(utf-8)) I had tried that, but then the text looks like crap