os-climate / sostrades-dev-tools

SoSTrades platform local environment deployment
Apache License 2.0
0 stars 4 forks source link

PrepareVenv.py cannot handle paths with spaces or parens #8

Open MichaelTiemannOSC opened 2 weeks ago

MichaelTiemannOSC commented 2 weeks ago

If you try to run this script from a POSIX root that has spaces in filenames (such as "/Users/michael/Dropbox/My Mac (MacBook-Pro.local)/") the run_command function will fail (as will several subsequent things).

A workaround is to clone the root into an environment without such characters in the root.

A path for a fix is to change the interface to use the subprocess module (see PEP 324).

shlex makes a mess of things because the quotes it uses to protect bash are quotes that are mis-interpreted by os.* commands.