Asger Ottar Alstrup wrote: > Angus Leeming wrote: >> Also, I found that we are unable to launch any executables as >> C:\Program Files\LyX\bin\foo.exe because the executable cannot be >> quoted. Hence the new version of clean_dvi.py on the wiki. >> >> Yes, Windows is weird. > > Hu? > > "C:\Program Files\LyX\bin\foo.exe" "my argument" "is the disco king" > > will work.
But neither of these will (taken from clean_dvi.py): dt2dv = 'C:\Program Files\LyX\bin\dt2dv.exe' dt2dv_call = '%s -si "%s"' % ( dt2dv, outfile ) dt2dv_stdin = os.popen(dt2dv_call, 'w') dt2dv_call = '"%s" -si "%s"' % ( dt2dv, outfile ) dt2dv_stdin = os.popen(dt2dv_call, 'w') The only thing that works here is to add 'C:\Program Files\LyX\bin' to the PATH and use dt2dv_call = 'dt2dv -si "%s"' % outfile dt2dv_stdin = os.popen(dt2dv_call, 'w') which is simpler and cleaner anyway :) -- Angus