I'm trying to write myself a program that calculates a function taken from a Tk.Entry().
The problem is, when I try to run my display() function
(it runs Tkinter, sets up the window, and calls root.Mainloop()),
I get parse errors coming from eval() from a function that is supposed to be called only if the user inputs all of the variables and presses a button (the button's command).
The function uses eval(variable), while variable is entry.get().
What am I doing wrong here?
def cfunc(_n,_f,_t0,_tn,):
xbase=[]
tbase=[]
t=0
n2=eval(_n) #Stuff happens here, cfunc gets entry_n.get() as arguments.
f2=_f #Also, tabs are correct in the original.
tmin2=eval(_t0)
tmax2=eval(_tn)
tr=tmax2-tmin2
sk = tr / n2
i2=tmin2
Also, error:
File "Q:\Py\counter.py", line 89, in
cfunc n2=eval(_n) File "", line 0
^ SyntaxError: unexpected EOF while parsing
evalplays a part in it or not: Usingevalis the real madness ;) - user395760