subprocess chokes on spaces in path

BartlebyScrivener bscrivener42 at gmail.com
Wed Nov 7 16:48:43 CET 2007


On Nov 6, 2:48 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar> wrote:
>
> Use a list of arguments [antiword, word_doc] and let subprocess handle the
> spaces the right way.
>

Got it working. Thank you both.

p = subprocess.Popen([antiword, word_doc], stdout=subprocess.PIPE)
doc_text = p.stdout.read()

rd







More information about the Python-list mailing list