[sympy] Re: Ipython Notebook in Sympy_Gamma

2014-02-14 Thread SAHIL SHEKHAWAT
i have also tried to work with changing its encoding or using eval(my_string)..but for mathjax it gives error. On Saturday, February 15, 2014 4:50:30 AM UTC+5:30, SAHIL SHEKHAWAT wrote: please help me out! i am passing mathjax generated from result set of sympy_gamma as json to template of

[sympy] Re: Ipython Notebook in Sympy_Gamma

2014-02-14 Thread David Li
Hey Sahil, If I understand correctly, you want the MathJax output to appear correctly to the user on the page (e.g. so that it is copy-pastable into a LaTeX document)? Django has 'filters' to control if/how the content is escaped in the template. For instance, you might have '{{

[sympy] Re: Ipython Notebook in Sympy_Gamma

2014-02-14 Thread SAHIL SHEKHAWAT
I have already used escape filter but it only escapes ,,..etc but not backslash.. due to escape filter i was able to get the html string to be displayed into my json output...but now i want to remove all the escaping(extra) backslashes.. On Saturday, February 15, 2014 4:50:30 AM UTC+5:30,

[sympy] Re: Ipython Notebook in Sympy_Gamma

2014-02-14 Thread David Li
What about .decode('string_escape')? http://stackoverflow.com/questions/1885181/how-do-i-un-escape-a-backslash-escaped-string-in-python David On Friday, February 14, 2014 4:53:48 PM UTC-7, SAHIL SHEKHAWAT wrote: I have already used escape filter but it only escapes ,,..etc but not

[sympy] Re: Ipython Notebook in Sympy_Gamma

2014-02-14 Thread SAHIL SHEKHAWAT
Either i have done a big mistake or this is not as easy as it seems.. On Saturday, February 15, 2014 4:50:30 AM UTC+5:30, SAHIL SHEKHAWAT wrote: please help me out! i am passing mathjax generated from result set of sympy_gamma as json to template of django which include escape sequences and

[sympy] Re: Ipython Notebook in Sympy_Gamma

2014-02-14 Thread SAHIL SHEKHAWAT
i have also tried this infact this was the first thing i tried but this only replaces character like '\\n' with '\n' but with character like '\\w' this doesn't work.. On Saturday, February 15, 2014 4:50:30 AM UTC+5:30, SAHIL SHEKHAWAT wrote: please help me out! i am passing mathjax generated

[sympy] Re: Ipython Notebook in Sympy_Gamma

2014-02-14 Thread SAHIL SHEKHAWAT
you can see the problem into my pull request..the json it generates does have all the backslashes..i think the second option can solve..what you suggest? that way django will itself render the variables. and JS will render the json..will it do? On Saturday, February 15, 2014 4:50:30 AM