Coder Social home page Coder Social logo

scoder / mathdom Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 3.0 584 KB

Mathematical term parser and Content MathML converter in Python -- you probably want to use SymPy instead

Home Page: http://www.sympy.org/

License: MIT License

Shell 0.57% Python 38.47% HTML 3.83% CSS 0.32% XSLT 56.81%

mathdom's Introduction

Hi there, I'm Stefan πŸ‘‹

  • πŸ§‘πŸ½β€πŸ’» I am the maintainer of Cython, lxml and a few other Python data processing tools that you can find below.
  • πŸ§‘πŸ½β€πŸ’» I am also a core developer of CPython and contributor to many other open source software projects.
  • 🀝 In my city there's an old house from the 1600s with an inscription: "May God give to all those who know me, twice what they feel that they owe me" (*). With a donation, YOU can help me live the life that you think I deserve for the work that I do on Cython and on lxml, or my other projects.
  • πŸ€” You can contact me at [email protected]
  • πŸ˜„ My pronouns are he/him
  • πŸ—£οΈ I speak and πŸ–‹οΈ write in Deutsch, English, FranΓ§ais

(*) original German inscription: "Gott gebe allen, die mich kennen, doppelt so viel, als sie mir gΓΆnnen"

mathdom's People

Contributors

scoder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mathdom's Issues

MathDOM.fromStream should not be a classmethod?

I am trying to parse some mathml code using lmathdom.MathDOM.fromString. However, I it is raising an exception in lmathdom.MathDOM.fromStream because it references self._parser despite it being a classmethod (see below)

@classmethod
def fromStream(cls, input, input_type='mathml'):
    """Build a MathDOM from the file-like object input using the
    stringterm parser for input_type."""
    if input_type == 'mathml':
        return cls( ElementTree(file=input, parser=self._parser) )
    else:
        sax_parser = SaxTerm.for_input_type(input_type)
        return cls.fromSax(input, sax_parser())

self._parser is set in the __init__ method. Does that mean that lmathdom.MathDOM.fromStream should not be a classmethod?

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.