-
Notifications
You must be signed in to change notification settings - Fork 286
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
Deleting files does not work on Windows #56
Comments
I've changed the file deletion in generate_pdf() to this: if clean:
for ext in ['.aux', '.log', '.out', '.tex']:
try:
os.remove(filename + ext)
except:
pass which works great on windows. The exception handling should be done better (Log? Or Print?), but for a quick fix this is enough. |
Looks good, I don't think the exception should be a bit more specific. I'm not sure what error is raised when the file is not there, possibly IOerror or something, that way an unexpected exception is still recognized. But the handling itself is good, when the file is not there it also doesn't have to be removed. One more question, does the compiling really work on linux. Since the code uses the pdflatex command, or do you supply a different command for windows? |
There is a whole latex for windows including pdflatex: |
It should be fixed by by af96fc00 |
Oh, it seems I'm using a python 3 specific error. I will fix that, but for now could you guys check if it works with Python 3? |
af96fc00 |
Great, then I will close the issue. Btw I have made a workaround for the error, so Python 2 should work again as well. |
Can this issue be reopened? This bug exists again, see the comment I made for commit f6ffaa4 |
I missed those when merging. It should be fixed now. |
Deleting files does not work on Windows.
Because you're using linux command "rm'.
It is better to use os.remove:
https://docs.python.org/2/library/os.html#os.remove
The text was updated successfully, but these errors were encountered: