Re: Parsing unicode (devanagari) text with xml.dom.minidom

2009-03-08 Thread rparimi
On Mar 8, 12:42 am, Stefan Behnel wrote: > rpar...@gmail.com wrote: > > I am trying to process an xml file that contains unicode characters > > (seehttp://vyakarnam.wordpress.com/). Wordpress allows exporting the > > entire content of the website into an xml file. Using > > xml.dom.minidom,  I wro

Parsing unicode (devanagari) text with xml.dom.minidom

2009-03-07 Thread rparimi
Hello, I am trying to process an xml file that contains unicode characters (see http://vyakarnam.wordpress.com/). Wordpress allows exporting the entire content of the website into an xml file. Using xml.dom.minidom, I wrote a few lines of python code to parse out the xml file, but am stuck with t

fork after creating temporary file using NamedTemporaryFile

2008-07-15 Thread rparimi
Hello pythoners, When I create temporary file using the tempfile module, and forkI) later on in my program, I always see errors when the program exits. Is this because the child process deletes temp file? Here's a stripped down version of my script that exhibits this problem: #!/usr/bin/python i

redirecting output of process to a file using subprocess.Popen()

2008-07-09 Thread rparimi
I am trying to redirect stderr of a process to a temporary file and then read back the contents of the file, all in the same python script. As a simple exercise, I launched /bin/ls but this doesn't work: #!/usr/bin/python import subprocess as proc import tempfile name = tempfile.NamedTemporaryFile