bonelake at gmail.com
Sat Jan 26 14:39:54 UTC 2008
On Jan 26, 2008, at 8:31 AM, Alain Matthes wrote:
> Le 26 janv. 08 à 14:41, Brad Miller a écrit :
>> os.popen4 executes the command as a subprocess and returns a pipes
>> to standard in / standard out/error These pipes are used to
>> parse the output from latex.
>> As an experiment you could try os.system("pdflatex --shell-escape -
>> interaction=nonstopmode -file-line-error-style"+" " +"/Users/ego/
>> This will run the command in a subshell, but will not return pipes
>> for parsing. I don't think it should make any difference but who
>> knows. I really cannot explain why this is not working for you but
>> I know nothing about the intricacies of metapost and even less
>> about giac.
> I try
> os.system(ltxcmd+" "+shell_quote(texfile))
> texin,tex = os.popen4(ltxcmd+" "+shell_quote(texfile))
> The first command creates the .pdf files but after popen4 the file
> is removed !
That is because you are running the command twice.
system runs the command but does not give me access to parse the output.
popen4 runs the command too but also gives me access to its output.
system creates a subshell to run the program in, and that appears to
work. popen creates a subprocess, and that appears to be the
difference that is causing your particular program to fail.
As I said, I'm investigating the subprocess module which appears to be
a more flexible replacement for system and popen*
> Regards Alain
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
More information about the textmate