tags:

views:

32

answers:

1

I have an argument in Python that is screwing up my subprocess() command. The argument is:

--server-args="-screen 0, 1280x800x24"

args = [ 'xvfb-run', '--server-args="-screen 0, 1280x800x24"', '/usr/bin/python', '/root/AdamN-python-webkit2png-3ae4322/webkit2png.py', '-o', filename, url, ]

I think it's escaping the double quotes. Is there a work around for this?

+1  A: 

This is Python code, not a shell command line.

A shell command line eats the quotes to keep the spaces - in Python, the spaces are kept by a different means, so the quotes are passed on as-is and become part of the argument the called program actually sees.

ndim