[code] [textadept] spawn() in Win with quoted strings

From: Giovanni Salmeri <g.salmeri.att.mondodomani.org>
Date: Sat, 11 Mar 2017 18:07:41 +0100

Hello everybody.

There is something in spawn in Win that I don't understand. I have to
spawn a program with two filenames as arguments. This works:

spawn('path/program.exe path/file1 path/file2')

But I should quote both the name of the program and those of each of the
files, because it is possible that they contain spaces. Now, this
does *not* work:

spawn('"path/program.exe" "path/file1" "path/file2"')

But if I quote either the name of the program or the names of the
files, it does work like expected:

spawn('path/program.exe "path/file1" "path/file2"')
spawn('"path/program.exe" path/file1 path/fil2e')

It seems very strange to me... (If it is of interest, the program is in
Python, generated by pyinstaller, and uses the module argparse.) Any
hints or suggestions? Thank you!

-- 
Giovanni Salmeri
http://mondodomani.org/pers/salmeri/
-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Sat 11 Mar 2017 - 12:07:41 EST

This archive was generated by hypermail 2.2.0 : Sun 12 Mar 2017 - 06:48:30 EDT