5.8-stable: lang/python/2.7 -tkinter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

5.8-stable: lang/python/2.7 -tkinter

Adam Jensen
Is this a problem in the ports system or have I overlooked something?

Prelude:

hanzer:/home/hanzer:25$ pkg_info | grep -i tkinter
python-tkinter-2.7.10 tk GUI module for Python
python-tkinter-3.4.3 tk GUI module for Python

hanzer:/home/hanzer:26$ dmesg | head -n 2
OpenBSD 5.8-stable (GENERIC) #1: Sun Feb 28 17:25:17 EST 2016
    [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC


Happy:

hanzer:/home/hanzer:27$ python3.4
Python 3.4.3 (default, Mar  6 2016, 17:13:33)
[GCC 4.2.1 20070719 ] on openbsd5
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> quit()


Fail:

hanzer:/home/hanzer:28$ python2.7
Python 2.7.10 (default, Feb 15 2016, 02:20:42)
[GCC 4.2.1 20070719 ] on openbsd5
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named tkinter
>>> quit()

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 5.8-stable: lang/python/2.7 -tkinter

Remi Pointel
On 04/02/16 02:24, Adam Jensen wrote:

> Is this a problem in the ports system or have I overlooked something?
>
> Prelude:
>
> hanzer:/home/hanzer:25$ pkg_info | grep -i tkinter
> python-tkinter-2.7.10 tk GUI module for Python
> python-tkinter-3.4.3 tk GUI module for Python
>
> hanzer:/home/hanzer:26$ dmesg | head -n 2
> OpenBSD 5.8-stable (GENERIC) #1: Sun Feb 28 17:25:17 EST 2016
>      [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC
>
>
> Happy:
>
> hanzer:/home/hanzer:27$ python3.4
> Python 3.4.3 (default, Mar  6 2016, 17:13:33)
> [GCC 4.2.1 20070719 ] on openbsd5
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import tkinter
>>>> quit()
>
>
> Fail:
>
> hanzer:/home/hanzer:28$ python2.7
> Python 2.7.10 (default, Feb 15 2016, 02:20:42)
> [GCC 4.2.1 20070719 ] on openbsd5
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import tkinter
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
> ImportError: No module named tkinter
>>>> quit()
>

Hello,

Tkinter has been renamed to tkinter in Python 3, so you should import
'Tkinter' in Python 2 (https://docs.python.org/2/library/tkinter.html).

Cheers,

Remi.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 5.8-stable: lang/python/2.7 -tkinter

Adam Jensen
On Sat, 2 Apr 2016 08:24:19 +0200
Remi Pointel <[hidden email]> wrote:

>
> Hello,
>
> Tkinter has been renamed to tkinter in Python 3, so you should import
> 'Tkinter' in Python 2 (https://docs.python.org/2/library/tkinter.html).
>
> Cheers,
>
> Remi.

Thanks, Remi. That fixes the problem. I feel a bit goofy for not doing the basic research before posting to ports-bugs.

Loading...