Converting an ugly path to a shell path
malaclypse2 at gmail.com
Tue Sep 14 01:37:08 CEST 2010
On Mon, Sep 13, 2010 at 7:07 PM, <AmFreak at web.de> wrote:
> The problem that occurs now is when the user selects an "ugly" path like
> this /home/user/!" §$/.
> The shell don't understand the special chars so i have to escape them with
> "\" .
> Is there a function that does this ?
seems to cover most of the possibilities.
Particularly, do you really need shell=True? If not, you can just
call Popen([command, path], stdout=PIPE, stderr=PIPE) and not worry
More information about the Python-list