Re: I need help with making my claculator

2017-05-24 Thread woooee
This is most likely using class objects instead of instance objects. Not a normal thing in Python. As stated above, it is difficult, as the responses in this thread show, to get assistance with some alternate coding style. It is better to use Python in the way that is intended. Otherwise, yo

Re: I need help with making my claculator

2017-05-24 Thread MRAB
On 2017-05-25 00:02, woo...@gmail.com wrote: How do you then run the mainloop, i.e. get it to do something? tkinter.mainloop() -- https://mail.python.org/mailman/listinfo/python-list

Re: I need help with making my claculator

2017-05-24 Thread woooee
How do you then run the mainloop, i.e. get it to do something? -- https://mail.python.org/mailman/listinfo/python-list

Re: I need help with making my claculator

2017-05-21 Thread Peter Otten
woo...@gmail.com wrote: > First, you have to have a Tk instance before you do anything else. Take a > look at this example, and then expand upon it to create the calculator > http://python-textbok.readthedocs.io/en/1.0/Introduction_to_GUI_Programming.html While I agree that creating a Tk instan

Re: I need help with making my claculator

2017-05-21 Thread woooee
First, you have to have a Tk instance before you do anything else. Take a look at this example, and then expand upon it to create the calculator http://python-textbok.readthedocs.io/en/1.0/Introduction_to_GUI_Programming.html -- https://mail.python.org/mailman/listinfo/python-list

Re: I need help with making my claculator

2017-05-20 Thread bartc
On 20/05/2017 14:49, Steve D'Aprano wrote: On Sat, 20 May 2017 09:13 pm, bartc wrote: Try running the program. (I did that but I can't follow this style of coding so can't help.) Chris is within his rights to refuse to run untrusted code downloaded over the internet. It's not even the secu

Re: I need help with making my claculator

2017-05-20 Thread Joel Goldstick
On Sat, May 20, 2017 at 9:49 AM, Steve D'Aprano wrote: > On Sat, 20 May 2017 09:13 pm, bartc wrote: > >> On 20/05/2017 03:10, Chris Angelico wrote: >>> Without any specific questions, you're not going to get anything more >>> than a basic eyeballing of the code. >> >> Try running the program. >> >

Re: I need help with making my claculator

2017-05-20 Thread Steve D'Aprano
On Sat, 20 May 2017 09:13 pm, bartc wrote: > On 20/05/2017 03:10, Chris Angelico wrote: >> Without any specific questions, you're not going to get anything more >> than a basic eyeballing of the code. > > Try running the program. > > (I did that but I can't follow this style of coding so can't h

Re: I need help with making my claculator

2017-05-20 Thread Chris Angelico
On Sat, May 20, 2017 at 9:13 PM, bartc wrote: > On 20/05/2017 03:10, Chris Angelico wrote: >> >> On Sat, May 20, 2017 at 11:40 AM, wrote: >>> >>> def calc(self, display): >>> try: >>> display.set(eval(display.get())) >>> except: >>> display.set("Type an actual equation pl

Re: I need help with making my claculator

2017-05-20 Thread bartc
On 20/05/2017 03:10, Chris Angelico wrote: On Sat, May 20, 2017 at 11:40 AM, wrote: def calc(self, display): try: display.set(eval(display.get())) except: display.set("Type an actual equation please!") Without any specific questions, you're not going to get anything m

Re: I need help with making my claculator

2017-05-19 Thread Chris Angelico
On Sat, May 20, 2017 at 11:40 AM, wrote: > def calc(self, display): > try: > display.set(eval(display.get())) > except: > display.set("Type an actual equation please!") Without any specific questions, you're not going to get anything more than a basic eyeballing of the co

I need help with making my claculator

2017-05-19 Thread gareths2017
Im using Python 3.4.2 This is my code: from tkinter import* def iCalc(source, side): storeObj= Frame(source, borderwidth= 1, bd= 4, bg="powder blue") storeObj.pack(side=side, expand=YES, fill=BOTH) return storeObj def button (source, side, text, command=None): storeObj= Button(s