[Tkinter-discuss] pybwidget newbie questions re: Tree

Arthur C arthurc at rogers.com
Tue Dec 21 22:57:07 CET 2004


I've been slowly getting up to speed on the BWidget
package and since I'm using Python, the pybwidget
wrapper.  So far so good with some nuances
encountered:

- the .xpm files in the images directory don't get
auto installed.  There was one demo that gack'd
without them.    I just copied them in but modifying
the setup.py file to include them is likely sane no?

- I've gotten used to Tkinter's definition of
constants such as NORMAL (which is merely a string
'normal') for certain argument values.  When adding
nodes off the root to a Tree, the Tcl code uses the
name root.  I was expecting to do something like:

 t = Tree( ... )
 t.insert( END, ROOT, text = 'Something' )

Okay, so not ROOT constant exists.  So, what do I use?
 I'm guess 'root'.  Changed the code to:

 t.insert( END, 'root', text = 'Something' )

Now, I want to delete all the nodes in the tree.  So I
want to do something like:

 t.delete( t.nodes( 'root' ) )

However, doing so gives the following error:

TclError: wrong # args: should be "Tree::nodes path
node ?first? ?last?"

Any idea what the issue is?  FYI, I'm using
pybwidget-0.1.1_1.7.0

Thanks for any clues offered.

Regards,
Arthur


More information about the Tkinter-discuss mailing list