Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #83495

Re: [ANN] EasyGUI_Qt version 0.9

References <4c3dbebe-0184-4ca7-9d7d-30462ae2a578@googlegroups.com> <2f1dd848-e075-4435-93ef-c65af9a5148b@googlegroups.com> <b4d90fbf-9f5a-4ffa-9013-0e70fc3e4e24@googlegroups.com>
Date 2015-01-10 10:32 +0100
Subject Re: [ANN] EasyGUI_Qt version 0.9
From Chris Warrick <kwpolska@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.17559.1420882357.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Sat, Jan 10, 2015 at 2:02 AM, André Roberge <andre.roberge@gmail.com> wrote:
> On Friday, 9 January 2015 19:09:15 UTC-4, stephen...@gmail.com  wrote:
>> One issue is the format returned for the calendar selection. For today, the string returned is "Fri Jan 9 2015". My script needs to convert the date to a datetime.date, and having the month returned as a string instead of an integer makes this harder.
>
> Would today's date be represented as the string "09.01.2015" useful to you? (I found out how to do this.)  If so, I could perhaps add an argument like numeric_format = True.

The correct way to handle this is to use cal.date.toPyDate(), which
helpfully returns a datetime.date object — and make this the default
output of the calendar function, because that’s the only useful output
for anyone asking for a date.

>>> date
'Sat Jan 10 2015'
>>> cal.date
PyQt4.QtCore.QDate(2015, 1, 10)
>>> cal.date.toPyDate()
datetime.date(2015, 1, 10)

-- 
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[ANN] EasyGUI_Qt version 0.9 André Roberge <andre.roberge@gmail.com> - 2014-12-31 14:24 -0800
  Re: [ANN] EasyGUI_Qt version 0.9 wxjmfauth@gmail.com - 2015-01-01 02:39 -0800
  Re: [ANN] EasyGUI_Qt version 0.9 wxjmfauth@gmail.com - 2015-01-02 02:29 -0800
    Re: [ANN] EasyGUI_Qt version 0.9 André Roberge <andre.roberge@gmail.com> - 2015-01-02 11:11 -0800
      Re: [ANN] EasyGUI_Qt version 0.9 Emil Oppeln-Bronikowski <emil@fuse.pl> - 2015-01-02 20:27 +0100
        Re: [ANN] EasyGUI_Qt version 0.9 André Roberge <andre.roberge@gmail.com> - 2015-01-02 11:53 -0800
          Re: [ANN] EasyGUI_Qt version 0.9 Emil Oppeln-Bronikowski <emil@fuse.pl> - 2015-01-02 21:21 +0100
            Re: [ANN] EasyGUI_Qt version 0.9 André Roberge <andre.roberge@gmail.com> - 2015-01-02 13:35 -0800
      Re: [ANN] EasyGUI_Qt version 0.9 wxjmfauth@gmail.com - 2015-01-03 00:52 -0800
        Re: [ANN] EasyGUI_Qt version 0.9 André Roberge <andre.roberge@gmail.com> - 2015-01-03 09:11 -0800
          Re: [ANN] EasyGUI_Qt version 0.9 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-01-03 17:38 +0000
            Re: [ANN] EasyGUI_Qt version 0.9 wxjmfauth@gmail.com - 2015-01-04 01:32 -0800
          Re: [ANN] EasyGUI_Qt version 0.9 Michael Torrie <torriem@gmail.com> - 2015-01-03 16:06 -0700
          Re: [ANN] EasyGUI_Qt version 0.9 wxjmfauth@gmail.com - 2015-01-04 00:12 -0800
  Re: [ANN] EasyGUI_Qt version 0.9 stephen.boulet@gmail.com - 2015-01-09 15:08 -0800
    Re: [ANN] EasyGUI_Qt version 0.9 André Roberge <andre.roberge@gmail.com> - 2015-01-09 16:21 -0800
    Re: [ANN] EasyGUI_Qt version 0.9 André Roberge <andre.roberge@gmail.com> - 2015-01-09 17:02 -0800
      Re: [ANN] EasyGUI_Qt version 0.9 Chris Warrick <kwpolska@gmail.com> - 2015-01-10 10:32 +0100
      Re: [ANN] EasyGUI_Qt version 0.9 stephen.boulet@gmail.com - 2015-01-13 04:23 -0800
        Re: [ANN] EasyGUI_Qt version 0.9 André Roberge <andre.roberge@gmail.com> - 2015-01-13 12:29 -0800
          Re: [ANN] EasyGUI_Qt version 0.9 stephen.boulet@gmail.com - 2015-01-14 09:12 -0800

csiph-web