`shell_format` work incorrect on windows.
Issue #30
invalid
from sarge import shell_shlex, shell_format
import shlex
import subprocess
cmd = shell_format("python -c {0}", "print('aw')")
print(cmd)
This code produse:
C:\Users\pahaz_000>C:\Python27\python.exe z.py
python -c 'print('\''aw'\'')'
And on windows whis in incorrect:
C:\Users\pahaz_000\PycharmProjects\dokku>python -c 'print('\''aw'\'')'
File "<string>", line 1
'print('\''aw'\'')'
^
SyntaxError: unexpected character after line continuation character
On linux correct:
(venv)root@precise64:/vagrant# python -c 'print('\''aw'\'')'
aw
Comments (5)
-
reporter -
reporter - changed status to resolved
-
reporter - changed status to open
windows
support -
reporter - changed title to `shell_format` work incorrect on windows.
-
repo owner - changed status to invalid
It's not suggested that you can pass a
shell_format
ted command line directly tocmd.exe
- just that you should be able to run it compatibly insarge
, whether or not you're runningcygwin
. - Log in to comment
Sorry, I found in docs this "A simple run command which allows a rich subset of Bash-style shell command syntax, but parsed and run by sarge so that you can run on Windows without cygwin."