Subject: Re: Python and Tk?
To: Min Sik Kim <minskim@NetBSD.org>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: tech-pkg
Date: 11/04/2005 11:36:03
In message <1BF6DB3F-2ECC-4DD2-905C-276AB91A9580@NetBSD.org>, Min Sik Kim write
s:
>On Nov 4, 2005, at 7:19 AM, Steven M. Bellovin wrote:
>
>> I'm trying to use Python's Tk interface, but I get this error:
>>
>> Traceback (most recent call last):
>> File "./run", line 4, in ?
>> from Tkinter import *
>> File "/usr/pkg/lib/python2.4/lib-tk/Tkinter.py", line 38, in ?
>> import _tkinter # If this fails your Python may not be
>> configured for Tk
>> ImportError: No module named _tkinter
>>
>> I have Python 2.4 and tk 8.4.11nb1, both installed from pkgsrc. The
>> Python README says that Tk support is automatically included if Tk is
>> detected at build time; I rebuilt Python to be sure, but it didn't
>> help.
>
>Many modules in the Python distfile are separate packages in pkgsrc.
>x11/py-Tk will give you the _tkinter module.
>
Thanks -- I'd looked in lang, but not x11. Not that it built cleanly
lots of the patches failed.
----
--------------------------
|$NetBSD: patch-aa,v 1.1.1.1 2004/12/05 23:27:49 recht Exp $
|
|--- Include/py_curses.h.orig Sun Jun 29 17:46:21 2003
|+++ Include/py_curses.h
--------------------------
No file to patch. Skipping...
Hunk #1 ignored at 39.
1 out of 1 hunks ignored
done
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-ab,v 1.1.1.1 2004/12/05 23:27:49 recht Exp $
|
|--- Lib/distutils/command/build_ext.py.orig Sun Dec 5 22:03:11 2004
|+++ Lib/distutils/command/build_ext.py Sun Dec 5 22:03:25 2004
--------------------------
No file to patch. Skipping...
Hunk #1 ignored at 485.
1 out of 1 hunks ignored
done
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-ac,v 1.1.1.1 2004/12/05 23:27:49 recht Exp $
|
|--- Lib/distutils/command/build_scripts.py.orig Sun Dec 5 22:05:11 2004
|+++ Lib/distutils/command/build_scripts.py Sun Dec 5 22:05:34 2004
--------------------------
No file to patch. Skipping...
Hunk #1 ignored at 104.
1 out of 1 hunks ignored
done
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-ad,v 1.1.1.1 2004/12/05 23:27:49 recht Exp $
|
|--- Lib/posixfile.py.orig Wed Aug 18 17:13:40 2004
|+++ Lib/posixfile.py
--------------------------
No file to patch. Skipping...
Hunk #1 ignored at 183.
Hunk #2 ignored at 200.
2 out of 2 hunks ignored
done
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-ae,v 1.3 2005/10/01 21:12:05 recht Exp $
|
|--- Lib/test/test_fcntl.py.orig 2005-04-04 17:28:18.000000000 +0200
|+++ Lib/test/test_fcntl.py 2005-10-01 22:24:49.000000000 +0200
--------------------------
No file to patch. Skipping...
Hunk #1 ignored at 20.
1 out of 1 hunks ignored
done
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-af,v 1.4 2005/10/01 21:12:05 recht Exp $
|
|--- Makefile.pre.in.orig 2005-03-29 09:23:01.000000000 +1000
|+++ Makefile.pre.in
--------------------------
No file to patch. Skipping...
Hunk #1 ignored at 56.
Hunk #2 ignored at 94.
Hunk #3 ignored at 311.
Hunk #4 ignored at 360.
Hunk #5 ignored at 628.
5 out of 5 hunks ignored
done
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-ag,v 1.1.1.1 2004/12/05 23:27:49 recht Exp $
|
|--- Misc/setuid-prog.c.orig Thu Sep 10 22:18:09 1998
|+++ Misc/setuid-prog.c
--------------------------
No file to patch. Skipping...
Hunk #1 ignored at 70.
1 out of 1 hunks ignored
done
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-ah,v 1.2 2005/10/01 21:12:05 recht Exp $
|
|--- Modules/_cursesmodule.c.orig 2005-06-15 20:48:16.000000000 +0200
|+++ Modules/_cursesmodule.c 2005-10-01 22:25:32.000000000 +0200
--------------------------
No file to patch. Skipping...
Hunk #1 ignored at 317.
Hunk #2 ignored at 780.
Hunk #3 ignored at 1938.
Hunk #4 ignored at 1956.
Hunk #5 ignored at 2400.
Hunk #6 ignored at 2499.
Hunk #7 ignored at 2571.
Hunk #8 ignored at 2594.
8 out of 8 hunks ignored
done
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-ai,v 1.1.1.1 2004/12/05 23:27:51 recht Exp $
|
|--- Modules/_ssl.c.orig Wed Aug 4 16:59:00 2004
|+++ Modules/_ssl.c
--------------------------
No file to patch. Skipping...
Hunk #1 ignored at 7.
1 out of 1 hunks ignored
done
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-aj,v 1.1.1.1 2004/12/05 23:27:51 recht Exp $
|
|--- Modules/bsddbmodule.c.orig Tue May 6 22:38:52 2003
|+++ Modules/bsddbmodule.c
--------------------------
No file to patch. Skipping...
Hunk #1 ignored at 13.
1 out of 1 hunks ignored
done
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-ak,v 1.1.1.1 2004/12/05 23:27:51 recht Exp $
|
|--- Modules/posixmodule.c.orig Wed Oct 13 17:30:56 2004
|+++ Modules/posixmodule.c
--------------------------
No file to patch. Skipping...
Hunk #1 ignored at 298.
Hunk #2 ignored at 316.
2 out of 2 hunks ignored
done
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-al,v 1.8 2005/10/01 21:12:05 recht Exp $
|
|--- configure.orig 2005-08-07 23:08:42.000000000 +0200
|+++ configure 2005-10-01 22:26:48.000000000 +0200
--------------------------
No file to patch. Skipping...
Hunk #1 ignored at 1482.
Hunk #2 ignored at 3406.
Hunk #3 ignored at 3830.
Hunk #4 ignored at 10195.
Hunk #5 ignored at 10344.
Hunk #6 ignored at 10354.
Hunk #7 ignored at 10374.
Hunk #8 ignored at 10388.
Hunk #9 ignored at 10421.
Hunk #10 ignored at 10476.
Hunk #11 ignored at 14351.
11 out of 11 hunks ignored
done
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-am,v 1.2 2005/05/09 20:37:51 recht Exp $
|
|--- setup.py.orig 2005-03-09 23:27:24.000000000 +0100
|+++ setup.py 2005-05-09 15:11:47.000000000 +0200
--------------------------
Patching file setup.py using Plan A...
Hunk #1 failed at 15.
Hunk #2 failed at 238.
Hunk #3 failed at 458.
Hunk #4 failed at 466.
Hunk #5 failed at 484.
Hunk #6 failed at 542.
Hunk #7 failed at 1088.
7 out of 7 hunks failed--saving rejects to setup.py.rej
done
--Steven M. Bellovin, http://www.cs.columbia.edu/~smb