Re: No ttk in 2.7

2015-05-21 Thread Sturla Molden
Zachary Ware zachary.ware+pyl...@gmail.com wrote: The way I would do it is as follows: try: import tkinter as tk from tkinter import ttk except ImportError: import Tkinter as tk import ttk If I may suggest, just write it in Python3 first, then when it

Re: No ttk in 2.7

2015-05-20 Thread Ned Batchelder
On Wednesday, May 20, 2015 at 12:35:40 PM UTC-4, Cecil Westerhof wrote: I want to start playing with tkinter, but there are some differences between 2 and 3. For this I use at the moment the following code: import sys if sys.version_info[0] 3: import Tkinter as tk

Re: No ttk in 2.7

2015-05-20 Thread Ned Batchelder
On Wednesday, May 20, 2015 at 12:43:29 PM UTC-4, Ned Batchelder wrote: On Wednesday, May 20, 2015 at 12:35:40 PM UTC-4, Cecil Westerhof wrote: I want to start playing with tkinter, but there are some differences between 2 and 3. For this I use at the moment the following code: import

Re: No ttk in 2.7

2015-05-20 Thread Zachary Ware
On Wed, May 20, 2015 at 11:01 AM, Cecil Westerhof ce...@decebal.nl wrote: I want to start playing with tkinter, but there are some differences between 2 and 3. For this I use at the moment the following code: import sys if sys.version_info[0] 3: import Tkinter as tk

No ttk in 2.7

2015-05-20 Thread Cecil Westerhof
I want to start playing with tkinter, but there are some differences between 2 and 3. For this I use at the moment the following code: import sys if sys.version_info[0] 3: import Tkinter as tk import ttk else: import tkinter as tk from tkinter import

Re: No ttk in 2.7

2015-05-20 Thread Cecil Westerhof
Op Wednesday 20 May 2015 19:03 CEST schreef Zachary Ware: On Wed, May 20, 2015 at 11:01 AM, Cecil Westerhof ce...@decebal.nl wrote: I want to start playing with tkinter, but there are some differences between 2 and 3. For this I use at the moment the following code: import sys if

Re: No ttk in 2.7

2015-05-20 Thread Mark Lawrence
On 20/05/2015 19:52, Cecil Westerhof wrote: Op Wednesday 20 May 2015 18:47 CEST schreef Ned Batchelder: On Wednesday, May 20, 2015 at 12:43:29 PM UTC-4, Ned Batchelder wrote: On Wednesday, May 20, 2015 at 12:35:40 PM UTC-4, Cecil Westerhof wrote: I want to start playing with tkinter, but

Re: No ttk in 2.7

2015-05-20 Thread Cecil Westerhof
Op Wednesday 20 May 2015 18:47 CEST schreef Ned Batchelder: On Wednesday, May 20, 2015 at 12:43:29 PM UTC-4, Ned Batchelder wrote: On Wednesday, May 20, 2015 at 12:35:40 PM UTC-4, Cecil Westerhof wrote: I want to start playing with tkinter, but there are some differences between 2 and 3. For

Re: No ttk in 2.7

2015-05-20 Thread Ian Kelly
On Wed, May 20, 2015 at 12:54 PM, Cecil Westerhof ce...@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

Re: No ttk in 2.7

2015-05-20 Thread Cecil Westerhof
Op Wednesday 20 May 2015 18:43 CEST schreef Ned Batchelder: On Wednesday, May 20, 2015 at 12:35:40 PM UTC-4, Cecil Westerhof wrote: I want to start playing with tkinter, but there are some differences between 2 and 3. For this I use at the moment the following code: import sys if