#8552: replace os.system calls in latex.py with appropriate replacements
----------------------+-----------------------------------------------------
   Reporter:  ddrake  |       Owner:  tbd         
       Type:  defect  |      Status:  needs_review
   Priority:  major   |   Milestone:  sage-4.4    
  Component:  misc    |    Keywords:              
     Author:          |    Upstream:  N/A         
   Reviewer:          |      Merged:              
Work_issues:          |  
----------------------+-----------------------------------------------------
Changes (by ddrake):

  * status:  new => needs_review


Comment:

 These patches depend on the "v2" patch at #8486.

 Please look this patch over. I think I've tested all the execution paths
 and have everything working, but I only tested it on one system, so it
 needs some review and testing.

 A design decision that needs to be addressed: it's easiest to just do
 {{{subprocess.call()}}}, which waits for the command to finish; there are
 a few places where the {{{os.system}}} call ended with {{{&}}} to put the
 command in the background. I can reproduce that behavior with the
 subprocess module, but it's not as convenient, since I have to spawn the
 process and poll and so on. I can't detect much of a pattern or necessity
 to those places that possibly put the command in the background; is it
 okay if we just eliminate that option?

 Another issue: the viewer commands from {{{misc.viewer}}} on Linux all
 return strings with a space in them: {{{'sage-native-execute xdg-open'}}},
 which does not play nicely with subprocess; when you put that string into
 its call list, it tries to execute a single command with a space in it,
 named "sage-native-execute xdg-open" and this does not work well. It's
 easy enough to snag the "xdg-open" part, but if we eventually are using
 subprocess everywhere, we should switch the viewer commands to returning
 lists of strings.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8552#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to