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


Groups > comp.lang.python > #90979

Re: No ttk in 2.7

References <87r3qbqlve.fsf@Equus.decebal.nl> <mailman.179.1432141452.17265.python-list@python.org> <87egmbqdtp.fsf@Equus.decebal.nl>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2015-05-20 13:30 -0600
Subject Re: No ttk in 2.7
Newsgroups comp.lang.python
Message-ID <mailman.183.1432150260.17265.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, May 20, 2015 at 12:54 PM, Cecil Westerhof <Cecil@decebal.nl> wrote:
> Op Wednesday 20 May 2015 19:03 CEST schreef Zachary Ware:
>> try:
>> import tkinter as tk
>> from tkinter import ttk
>> except ImportError:
>> import Tkinter as tk
>> import ttk
>
> When there goes something wrong with:
>     from tkinter import ttk
> you will not understand what is happening. ;-)

If something goes wrong with the first import and raises an
ImportError, then it will execute the except clause, which will
definitely raise an ImportError. In this case the second error will
simply be chained onto the first, so the details of the first error
won't be lost.

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


Thread

No ttk in 2.7 Cecil Westerhof <Cecil@decebal.nl> - 2015-05-20 18:01 +0200
  Re: No ttk in 2.7 Ned Batchelder <ned@nedbatchelder.com> - 2015-05-20 09:43 -0700
    Re: No ttk in 2.7 Ned Batchelder <ned@nedbatchelder.com> - 2015-05-20 09:47 -0700
      Re: No ttk in 2.7 Cecil Westerhof <Cecil@decebal.nl> - 2015-05-20 20:52 +0200
        Re: No ttk in 2.7 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-20 21:55 +0100
    Re: No ttk in 2.7 Cecil Westerhof <Cecil@decebal.nl> - 2015-05-20 20:51 +0200
  Re: No ttk in 2.7 Zachary Ware <zachary.ware+pylist@gmail.com> - 2015-05-20 12:03 -0500
    Re: No ttk in 2.7 Cecil Westerhof <Cecil@decebal.nl> - 2015-05-20 20:54 +0200
      Re: No ttk in 2.7 Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-20 13:30 -0600
  Re: No ttk in 2.7 Sturla Molden <sturla.molden@gmail.com> - 2015-05-21 14:04 +0000

csiph-web