[Tutor] Tkinter Calendar to receive user entry.

Alan Gauld alan.gauld at yahoo.co.uk
Tue Feb 7 04:45:37 EST 2017


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 this? I looked up on the website, I came
> across this one,
> http://stackoverflow.com/questions/27774089/python-calendar-widget-return-the-user-selected-date
> But when I try to run it, it gives me an error saying that it is not able
> to recognize Calendar.

I'm really puzzled by that post because there is non Calendar widget
in ttk (or Tix) as of Python 3.4. They are discussing code that
should not work but they seem to have it working. I assume there
is a non standard ttk module out there somewhere?

> I would really appreciate some help with this. I also came to know that I
> could use calendar.Calendar to create an object for the same, but I am not
> good with working with objects 

You probably need to spend some time on that first. Everything
in Python is an object (even strings and numbers and lists etc).
So you really need to get comfortable with the idea of
accessing attributes and methods of objects.

You don't need to worry about creating classes and so on(yet),
but you do need to understand how to use other peoples objects.

Finally, if you are going to ask questions about code its
always good to show us exactly what code you typed as well
as the full error message.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list