[pygtk] gtk.Calendar: IN A DIALOG?

Darren Enns darethehair at gmail.com
Mon Apr 7 01:58:14 WST 2008


Luis Javier Peris wrote:
> Dare,
>
> you can use time module and use the localtime function, take the 
> localtime and set it in the gtk.Calendar, it's would be something like 
> this:
>
> import time
> year, month, day, hour, min, sec, wday, yday, isdst = time.localtime()
> calendar.select_month(year, month - 1)  # Remember moth takes values 
> from 0 to 11
> calendar.select_day(day)
> ------------------------------------------------------------------------
>
> _______________________________________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>   
Thanks for the tips!  Now I just need someone to put this together into 
a nice *small* bit of code so that I can call a calendar module (in a 
button), use it to display/set the date that I want upon exit/close, and 
return nicely to my caller module. :)

I am actually surprised that Google doesn't show me more 'real life' 
examples of 'gtk.Calendar' in use.

Dare


More information about the pygtk mailing list