Git Product home page Git Product logo

Comments (9)

jrast avatar jrast commented on July 17, 2024

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.

from pylatex.

JelteF avatar JelteF commented on July 17, 2024

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.
If you can make a pull request I will merge it.

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?

from pylatex.

winogradoff avatar winogradoff commented on July 17, 2024

There is a whole latex for windows including pdflatex:
http://miktex.org/download

from pylatex.

JelteF avatar JelteF commented on July 17, 2024

It should be fixed by by af96fc00
Could one of you confirm that it now works on Windows?

from pylatex.

JelteF avatar JelteF commented on July 17, 2024

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?

from pylatex.

winogradoff avatar winogradoff commented on July 17, 2024

af96fc00
I can confirm it works.
(Windows 8.1, Pyhton 3.4.1)

from pylatex.

JelteF avatar JelteF commented on July 17, 2024

Great, then I will close the issue. Btw I have made a workaround for the error, so Python 2 should work again as well.

from pylatex.

jrast avatar jrast commented on July 17, 2024

Can this issue be reopened? This bug exists again, see the comment I made for commit f6ffaa4

from pylatex.

JelteF avatar JelteF commented on July 17, 2024

I missed those when merging. It should be fixed now.

from pylatex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.