[Tkinter-discuss] using pybwidget

Jeff Epler jepler at unpythonic.net
Mon Nov 29 20:23:42 CET 2004


On Mon, Nov 29, 2004 at 12:07:01PM -0700, Stewart Midwinter wrote:
> Say, if you are running Windows, where did you put the bwidget
> package?  In the TCL folder?  I have TCL installed in c:\programs\tcl,
> so would it go there?

I haven't run the installer on windows to see what happens, or if the
resulting install works.  But just running "setup.py install" and
then using the bwidget module works fine on my Linux system.

The tcl files are placed under prefix in a directory called
share/pybwidget, so for me, this creates
    /usr/share/pybwidget/arrow.tcl
etc

I would have guessed that this would create a folder like
    C:\Python23\share\pybwidget
on windows, assuming that sys.prefix is 'C:\\PYTHON23'.

tcl is told about the location of the files by this code in bwidget/__init__.py:
    _datadir = os.path.join(sys.prefix, "share", "pybwidget")
    [...]
    class BWidget:
        def _require(self, master):
            auto_path = master.tk.call("set", "auto_path")
            if not _datadir in auto_path:
                master.tk.call("lappend", "auto_path", _datadir)

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.python.org/pipermail/tkinter-discuss/attachments/20041129/e4788415/attachment.pgp


More information about the Tkinter-discuss mailing list