[Tutor] On a looping input, subsequent inputs are hidden

eryksun eryksun at gmail.com
Wed Jun 12 02:16:35 CEST 2013


On Tue, Jun 11, 2013 at 2:33 PM, Jim Mooney <cybervigilante at gmail.com> wrote:
> On 11 June 2013 01:07, Alan Gauld <alan.gauld at btinternet.com> wrote:
>
>> First you are effectively creating an entire Tkinter app
>> inside popup() each time.
>
> I partially mis-spoke myself. The error was not caused Just by
> creating the app every time, but very oddly, by the Combination of
> recreating the app and using triple quote docstrings to change the
> error message in the duplicate app. Good Lord, nothing worse than a
> problem caused by two different things ;')

I wasn't able to reproduce the problem in Python 3.3.2 on Windows. It
ran as I expected it to run.

Note that triple quoted strings retain the indentation level. At
runtime you cam use textwrap.dedent:


    >>> s = '''\
    ...         comfy
    ...             chair'''

    >>> print(s)
            comfy
                chair

    >>> print(textwrap.dedent(s))
    comfy
        chair


More information about the Tutor mailing list