New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace os.system calls in latex.py with appropriate replacements #8552
Comments
Attachment: trac_8552_whitespace.patch.gz clean up unnecessary whitespace in latex.py |
replace os.system with subprocess.call; apply on top of whitespace patch |
comment:2
Attachment: trac_8552.patch.gz 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 Another issue: the viewer commands from |
Author: Dan Drake |
comment:3
Overall, it looks good. I think line 615,
we should have I notice that you don't seem to be using "base" in the switch from
to
But it seems to work with your patch, so I guess it's okay.
I think so. If you think it's worth asking around, you could post on sage-devel. Anyway, I think we can eliminate it, but we should probably keep the argument there for backwards compatibility, but have it do nothing -- this is what your patch does, right? We (meaning you) just need to document that the option no longer does anything.
If "s" is the output of one of these commands, can we do s.split() to turn it into a list, split at spaces (if there are any)? Oh, I guess that's what you're doing. Summary: fix the debugging issues (the print statement), and document the fact that "do_in_background" now has no effect, and I think this is ready to go. |
Reviewer: John Palmieri |
comment:4
I'm attaching two new patches here. One is a referee patch, present for review only: do not apply it. The other combines all of the patches into one. Dan, if you're happy with my changes, please give this a positive review. |
This comment has been minimized.
This comment has been minimized.
Attachment: trac_8552-ref.patch.gz for review only, do not apply (diff between Dan's two patches and the all-in-one patch) |
apply only this patch |
comment:5
Attachment: trac_8552-all-in-one.patch.gz Thanks for finishing this, John. Sorry I left it unfinished. Your changes look good. |
Changed author from Dan Drake to Dan Drake, John Palmieri |
Changed reviewer from John Palmieri to John Palmieri, Dan Drake |
Merged: sage-4.7.alpha4 |
This is a followup to #8486, which uses
os.system('which xelatex')
to see if XeLaTeX is available. With #8474 now merged, we should usehave_program
to do that, and also replace other uses ofos.system
with appropriatesubprocess
replacements, since we are supposed to use subprocess, and not os.systemApply only attachment: trac_8552-all-in-one.patch.
CC: @jhpalmieri
Component: misc
Author: Dan Drake, John Palmieri
Reviewer: John Palmieri, Dan Drake
Merged: sage-4.7.alpha4
Issue created by migration from https://trac.sagemath.org/ticket/8552
The text was updated successfully, but these errors were encountered: