[Tutor] Help with Multiple Inheritance in Classes

2017-02-07 Thread Vusa Moyo
I have a suspicion my lecturer's question is flawed, so I'd like to pose it to you guys to confirm my suspicions. Here goes.. I've gone and created a Class Cat1(cat): <-- inherited class, but cant seem get the code right which allows the test code to run successfully. We have a class defined for

Re: [Tutor] (no subject)

2017-02-07 Thread David Rock
> On Feb 7, 2017, at 15:09, တာန္ခတ္သန္ wrote: > > > # RockPaperScissors > > import random > print ("Hello.. Welcome from Rock, Paper, Scissors Game!!\n" > +"Game instruction:\n" > +"You will be playing with the computer.\n" > +"You need to choose one of your choice: Rock, Pape

[Tutor] (no subject)

2017-02-07 Thread တာန္ခတ္သန္
Hi, I am just start learning Python and I have an activity to do RockPaperScissors game using dictionary. I have written my code and it doesn't work at all. I am sending my code and the requirements. Can you please have a look and point out what is wrong there. Thank you very much. Warm regards,

Re: [Tutor] Multiple tabs using tkinter

2017-02-07 Thread Alan Gauld via Tutor
On 07/02/17 19:51, Zachary Ware wrote: >> But Tix has over 40 extra widgets including a tabbed notepad, >> balloon, meter, shell and and a very powerful (but undocumented!) >> grid control. > > Very little of tkinter is actually documented outside of the official > Tcl/Tk docs, unfortunately.

Re: [Tutor] Multiple tabs using tkinter

2017-02-07 Thread Alan Gauld via Tutor
On 07/02/17 18:59, Alan Gauld via Tutor wrote: > It should be easy since its just native Tcl code, there's no C Scratch that, I just found a C API for Tix so I guess it has some C after all. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author

Re: [Tutor] Tkinter Calendar to receive user entry.

2017-02-07 Thread Alan Gauld via Tutor
On 07/02/17 19:40, Peter Otten wrote: >>> from ttkcalendar import Calendar >> >> Doesn't work for me in either Python 3.6.0 or in Python 2.7.6 >> >> Which version of 2.7 are you using? > > The distribution's Python 2.7.6 on Linux Mint 17. After fixing the import > statements... OK, I went back

Re: [Tutor] Multiple tabs using tkinter

2017-02-07 Thread Zachary Ware
On Tue, Feb 7, 2017 at 12:59 PM, Alan Gauld via Tutor wrote: > On 07/02/17 16:41, Zachary Ware wrote: > >> Full disclosure, I've never actually used Tix beyond making it build >> with the rest of CPython on Windows and making sure it actually worked >> on one of my Linux buildbot workers. I have

Re: [Tutor] Error when trying to use classes

2017-02-07 Thread George Fischhof
2017-02-07 16:34 GMT+01:00 Rafael Skovron : > I'm trying to learn how to use Classes but I keep getting NameErrors no > matter what code I put into the script. > > Any ideas why? > > My general workflow is I edit in vim, then invoke python3 interpreter, > import the module and try to use the Clas

Re: [Tutor] Tkinter Calendar to receive user entry.

2017-02-07 Thread Peter Otten
Alan Gauld via Tutor wrote: > On 07/02/17 10:18, Peter Otten wrote: > >> $ cat demo.py >> #!/usr/bin/env python >> import calendar >> import ttk >> import Tkinter >> from ttkcalendar import Calendar > > Doesn't work for me in either Python 3.6.0 or in Python 2.7.6 > > Which version of 2.7 are y

Re: [Tutor] Error when trying to use classes

2017-02-07 Thread Alex Kleider
On 2017-02-07 07:34, Rafael Skovron wrote: I'm trying to learn how to use Classes but I keep getting NameErrors no matter what code I put into the script. Any ideas why? Assuming the code you've edited using vim is in a file mymodule.py And after invoking the interpreter you issue the follow

Re: [Tutor] Tkinter Calendar to receive user entry.

2017-02-07 Thread Alan Gauld via Tutor
On 07/02/17 10:18, Peter Otten wrote: > $ cat demo.py > #!/usr/bin/env python > import calendar > import ttk > import Tkinter > from ttkcalendar import Calendar Doesn't work for me in either Python 3.6.0 or in Python 2.7.6 Which version of 2.7 are you using? -- Alan G Author of the Learn to Pr

Re: [Tutor] Error when trying to use classes

2017-02-07 Thread Alan Gauld via Tutor
On 07/02/17 15:34, Rafael Skovron wrote: > My general workflow is I edit in vim, then invoke python3 interpreter, > import the module and try to use the Class and methods from the class. > > For example, importing customer.py and assigning this object yields: > rafael = Customer('rafael',10

Re: [Tutor] Multiple tabs using tkinter

2017-02-07 Thread Alan Gauld via Tutor
On 07/02/17 16:41, Zachary Ware wrote: > Full disclosure, I've never actually used Tix beyond making it build > with the rest of CPython on Windows and making sure it actually worked > on one of my Linux buildbot workers. I have only ever seen it as a > maintenance headache :) The beauty of Tix

[Tutor] Error when trying to use classes

2017-02-07 Thread Rafael Skovron
I'm trying to learn how to use Classes but I keep getting NameErrors no matter what code I put into the script. Any ideas why? My general workflow is I edit in vim, then invoke python3 interpreter, import the module and try to use the Class and methods from the class. For example, importing cus

Re: [Tutor] Tkinter Calendar to receive user entry.

2017-02-07 Thread Pooja Bhalode
Hi Alan, Thank you so much for your advice, I would start looking into learning some object oriented programming to make myself familiar with it. That would help me move ahead as well. Hi Peter, Thank you so much for your reply. Yes, that was the example that I was looking at on stackoverflow. Y

Re: [Tutor] Multiple tabs using tkinter

2017-02-07 Thread Zachary Ware
On Tue, Feb 7, 2017 at 3:56 AM, Alan Gauld via Tutor wrote: > On 07/02/17 03:31, Zachary Ware wrote: > >> ttk rather than Tix; Tix is unmaintained and soft-deprecated in 3.6+. > > Really? Thats a pity. > Tix was supposed to be the module with the extra widgets > and ttk was purely the themed versi

Re: [Tutor] Multiple tabs using tkinter

2017-02-07 Thread Alan Gauld via Tutor
On 07/02/17 03:56, Pooja Bhalode wrote: > you mentioned that there are multiple toolkits which can be used instead of > tkinter. I was also looking into wxpython for building a explorer bar. > Mainly, I have to build a software entirely using python and thus, needed > all these things put in place

Re: [Tutor] Tkinter Calendar to receive user entry.

2017-02-07 Thread Peter Otten
Alan Gauld via Tutor wrote: > On 07/02/17 00:24, Pooja Bhalode wrote: > >> I am trying to create a calendar using tkinter GUI such that when the >> user opens the GUI, > > So far as I'm aware there is no such Calendar widget in the standard > modules, you would need to find a third party module.

Re: [Tutor] Help with this work

2017-02-07 Thread Alan Gauld via Tutor
On 07/02/17 04:08, Sasiliyu Adetunji wrote: > I have been working on yhis assignment You are asking for help but in what regard? There is no question or problem statement in your post? I've put some general comments below... > class ShoppingCart(object): > > def __init__(self): > self.tot

Re: [Tutor] Multiple tabs using tkinter

2017-02-07 Thread Alan Gauld via Tutor
On 07/02/17 03:31, Zachary Ware wrote: > ttk rather than Tix; Tix is unmaintained and soft-deprecated in 3.6+. Really? Thats a pity. Tix was supposed to be the module with the extra widgets and ttk was purely the themed versions of same. Its a shame to confuse their purposes. OTOH it does mean t

Re: [Tutor] Help Please on python

2017-02-07 Thread Alan Gauld via Tutor
On 07/02/17 02:12, Laura Garcia wrote: > I need to create a python code that should simulate throwing darts by > random landing between (a random x and a random y)0 and 1. and the program > should print out number of darts that land within a rectangle. Look in the random module. There are a bunc

Re: [Tutor] Tkinter Calendar to receive user entry.

2017-02-07 Thread Alan Gauld via Tutor
On 07/02/17 00:24, Pooja Bhalode wrote: > I am trying to create a calendar using tkinter GUI such that when the user > opens the GUI, So far as I'm aware there is no such Calendar widget in the standard modules, you would need to find a third party module. > Can some one please help me with thi

Re: [Tutor] Multiple tabs using tkinter

2017-02-07 Thread Pooja Bhalode
Hi Alan and Zackary, Thank you so much for your inputs. I really appreciate any help on these things. Alan, you mentioned that there are multiple toolkits which can be used instead of tkinter. I was also looking into wxpython for building a explorer bar. Mainly, I have to build a software entire

[Tutor] Help with this work

2017-02-07 Thread Sasiliyu Adetunji
Hi, I have been working on yhis assignment Create a class called ShoppingCart Create a constructor that takes no arguments and sets the total attribute to zero, and initializes an empty dict attribute named items. Create a method add_item that requires item_name, quantity and price arguments. Th

[Tutor] Tkinter Calendar to receive user entry.

2017-02-07 Thread Pooja Bhalode
Hi, I am trying to create a calendar using tkinter GUI such that when the user opens the GUI, it would show a drop down menu similar to the one seen on flight websites for booking and then the user can select any specific date. I need to make this such that the user can navigate between years and

[Tutor] Help Please on python

2017-02-07 Thread Laura Garcia
I need to create a python code that should simulate throwing darts by random landing between (a random x and a random y)0 and 1. and the program should print out number of darts that land within a rectangle. ___ Tutor maillist - Tutor@python.org To un