Mini Kabibi Habibi
�
���dc @ s
d � Z d S( c C sG g } t } x+| D]#} g } | r5 | j d � n d | k pQ d | k pQ | } | rj | j d � n x� | D]� } | d k r� | j | � qq | d k r� | j d t | � d � g } | j d � qq | r� | j | � g } n | j | � qq W| r| j | � n | r | j | � | j d � q q Wd j | � S( s�
Translate a sequence of arguments into a command line
string, using the same rules as the MS C runtime:
1) Arguments are delimited by white space, which is either a
space or a tab.
2) A string surrounded by double quotation marks is
interpreted as a single argument, regardless of white space
contained within. A quoted string can be embedded in an
argument.
3) A double quotation mark preceded by a backslash is
interpreted as a literal double quotation mark.
4) Backslashes are interpreted literally, unless they
immediately precede a double quotation mark.
5) If backslashes immediately precede a double quotation mark,
every pair of backslashes is interpreted as a literal
backslash. If the number of backslashes is odd, the last
backslash escapes the next double quotation mark as
described in rule 3.
Extracted from subprocess.py so that distutils spawn.py can
use it too.
t s t "s \i s \"t ( t Falset appendt lent extendt join( t seqt resultt needquotet argt bs_buft c( ( s1 D:/a/msys64/mingw64/lib/python2.7/list2cmdline.pyt list2cmdline s4 !
N( R ( ( ( s1 D:/a/msys64/mingw64/lib/python2.7/list2cmdline.pyt <module> R