Ejemplo n.º 1
0
def data():
    equation_string = flask.request.args.get('equation')
    plotter = FieldPlotter()
    plotter.set_equation_from_string(equation_string)
    json_data = plotter.json_data()
    response = flask.make_response(json_data)
    response.mimetype = 'text/json'
    return response
Ejemplo n.º 2
0
 def test_json_data(self):
     equation = sympy.sympify('x*y')
     plotter = FieldPlotter(equation)
     json_data = plotter.json_data()