Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would change the first two lines to:

  from sympy.abc import *
  from sympy import *
I would put that into a file, and auto-load it at startup so I don't need to run it manually every time - one way of doing that is using iPython profiles.

Also put this in your startup file to get more pleasant looking output:

  init_printing(use_unicode=True)
Once you've done that, you only need to type:

  y = a*x**2 + b*x + c
  solve(y,x)


SymPy already comes with `isympy` script that will import everything from SymPy and create some common symbols (x, y, z, t, k, m, n, f, g, h) using either `python` or `ipython` (default). To do what you said the following script may be run.

  #!/usr/bin/env python
  from sympy.abc import *
  from sympy import *
  import code
  init_printing()
  code.interact(local=locals())




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: