winpdb and Phoenix

92 views
Skip to first unread message

braide...@gmail.com

unread,
Mar 8, 2017, 9:48:59 PM3/8/17
to wxPython-users
Hello,
Thanks to the very thorough translation page, I have been able to update most of winpdb to run in Phoenix. The only major problems I have concern variations on the proper translation of GetPyData statements in TreeListCtrl for the populating the namespace viewing panel.

The old statement:

   (expr, is_valid) = self.m_tree.GetPyData(child)

One thing I've tried that at least lets the program run:

   expr = self.m_tree.GetItemData(child)

Other than this panel, the program seems to be running fine - very usable, but not quite complete.

Any help would be greatly appreciated.

Cheers, Eric

Scott Talbert

unread,
Mar 8, 2017, 11:41:24 PM3/8/17
to wxPython-users
On Wed, 8 Mar 2017, braide...@gmail.com wrote:

> Hello,
> Thanks to the very thorough translation page, I have been able to update
> most of winpdb to run in Phoenix. The only major problems I have concern
> variations on the proper translation of GetPyData statements in TreeListCtrl
> for the populating the namespace viewing panel.
>
> The old statement:
>
>    (expr, is_valid) = self.m_tree.GetPyData(child)
>
> One thing I've tried that at least lets the program run:
>
>    expr = self.m_tree.GetItemData(child)

GetItemData() should be the correct replacement for GetByData(). Is it
not working?

Scott

braide...@gmail.com

unread,
Mar 9, 2017, 12:33:17 PM3/9/17
to wxPython-users

I guess a good night's sleep can do wonders. I now understand that the data for GetPyData is user set with a call to SetPyData and, as nearly as I can tell, pretty arbitrary.

In this case, for some reason the data isn't getting set, and most likely isn't a wxPython issue. On the other hand, I still need to figure out how to handle a no-longer-present "tree.GetChildrenCount(item)"


Cheers

Scott Talbert

unread,
Mar 9, 2017, 1:02:49 PM3/9/17
to wxPython-users

braide...@gmail.com

unread,
Mar 10, 2017, 11:32:02 PM3/10/17
to wxPython-users, s...@techie.net
The method shows for TreeCtrl but not for TreeListCtrl. Although it has characteristics of TreeCtrl, I don't think it inherits or at least exposes all the same methods.

Scott Talbert

unread,
Mar 11, 2017, 1:02:52 PM3/11/17
to braide...@gmail.com, wxPython-users
On Fri, 10 Mar 2017, braide...@gmail.com wrote:

> The method shows for TreeCtrl but not for TreeListCtrl. Although it has
> characteristics of TreeCtrl, I don't think it inherits or at least exposes
> all the same methods.

You are right, my bad. It looks like that method for TreeListCtrl was one
of the "gizmos" that wxPython added on:
https://github.com/wxWidgets/wxPython/blob/master/contrib/gizmos/wxCode/src/treelistctrl.cpp

I'm not sure if Robin has a plan for adding it back, but probably not.

braide...@gmail.com

unread,
Mar 12, 2017, 10:46:49 PM3/12/17
to wxPython-users, braide...@gmail.com, s...@techie.net
This is truly bad form, but I posted this to the Winpdb group a couple of days ago and haven't seen it come up yet.

Anyway, I have attached two files. The first is a mostly functioning version of Winpdb that (mostly) works under WxPython Phoenix. The second file is the original namespace class that isn't quite functioning. The most-probable cause is the lack of certain methods in the updated WxWidgets libraries, GetChildrenCount for example.

I think that this would be pretty straightforward to fix for someone familiar with the relational hierarchies. For me, I would/will need a good chunk of time to explore the ListTreeCtrl class and do enough examples so that I really understand how everything is related and what all the methods are dredging up.

Cheers,
Eric
winpdb.py
Original_Namspece_Class.py

braide...@gmail.com

unread,
Mar 22, 2017, 11:48:43 AM3/22/17
to wxPython-users, braide...@gmail.com, s...@techie.net
Hello,
With some ugly hacking, this winpdb version will now display one level in each of the namespace panels. This was sufficient for my needs at this point, and occasionally having to manually drill deeper into the tree is slightly less cumbersome than firing up a remote rpdb2 session (per https://brbsix.github.io/2015/11/19/using-winpdb-to-debug-python-3-applications/).

Other than the lack of a fully functional namespace tree, it seems to be working well.

Cheers, Eric
winpdb.py
Reply all
Reply to author
Forward
0 new messages