subprocess chokes on spaces in path

BartlebyScrivener bscrivener42 at gmail.com
Wed Nov 7 10:48:43 EST 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