Re: [OpenIndiana-discuss] python3
>> from Tkinter import * >> root = Tk() >> w = Label(root, text="Hello, world!") >> w.pack() >> root.mainloop() > > > Hello. > For python 3 it seems it should be > from tkinter import * Indeed this is correct. However, after changing Tkinter to tkinter I get $ python3.4 hello.py Traceback (most recent call last): File "hello.py", line 1, in from tkinter import * I compiled myself Python 3.6 the modified snippet works just fine. $ /opt/gnu/python3/bin/python3.6 --version Python 3.6.0 A.S. -- Apostolos Syropoulos Xanthi, Greece ___ openindiana-discuss mailing list openindiana-discuss@openindiana.org https://openindiana.org/mailman/listinfo/openindiana-discuss
Re: [OpenIndiana-discuss] python3
On 01/25/17 11:00 AM, Apostolos Syropoulos via openindiana-discuss wrote: Hello, I am trying to use python3 for a little introductory course and idle is not working. If I try the following program from Tkinter import * root = Tk() w = Label(root, text="Hello, world!") w.pack() root.mainloop() Hello. For python 3 it seems it should be from tkinter import * https://docs.python.org/3/library/tkinter.html -- С уважением, Александр Пыхалов, программист отдела телекоммуникационной инфраструктуры управления информационно-коммуникационной инфраструктуры ЮФУ ___ openindiana-discuss mailing list openindiana-discuss@openindiana.org https://openindiana.org/mailman/listinfo/openindiana-discuss
[OpenIndiana-discuss] python3
Hello, I am trying to use python3 for a little introductory course and idle is not working. If I try the following program from Tkinter import * root = Tk() w = Label(root, text="Hello, world!") w.pack() root.mainloop() I get python3.4 hello.py Traceback (most recent call last): File "hello.py", line 1, in from Tkinter import * ImportError: No module named 'Tkinter' Obviously Tk is not included in python3. Suggestions/comments? A.S. -- Apostolos Syropoulos Xanthi, Greece ___ openindiana-discuss mailing list openindiana-discuss@openindiana.org https://openindiana.org/mailman/listinfo/openindiana-discuss