So I take it you don't want it to work, even if you enter a function.
In other words, if the user enters "cos(x)", then it won't use the
cosine function.
Unfortunately, it's currently hardwired into the parser, i.e., on line
148 of sympy/parsing/sympy_parser.py:
global_dict = {}
exec 'from sympy import *' in global_dict
You could fix it by removing these lines. Really, it should let you
manually set the global_dict, just as you can set the local dict.
I created http://code.google.com/p/sympy/issues/detail?id=2947 for this.
Aaron Meurer
On Thu, Dec 15, 2011 at 7:46 AM, gsagrawal <[email protected]> wrote:
> Hi,
>
> I am doing very simple operations in which i convert user input into proper
> sympy format.
> So generally if you do sympify("abc") , it return a new symbol abc.
> but in cases when you do like sympify("re") it returns function. but my
> requirement is such that i want this to be symbol only.
> Off-course this is wrong to overwrite inbuilt functions , so is there any
> way i can avoid this or where can i find list of functions ?
>
> Thanks ,
> Ghanshyam Agrawal
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.