473,511 Members | 15,477 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

getting the value of an attribute from pdb

Hi

how can I "using pdb" get a value of an attribute?, read the docs and
played around with pdb 'p' for no avail.

thanks

class main:
def __init__(self, master):
self.master = master
self.master.title('parent')
self.master.geometry('200x150+300+225')
....
root = Tk()

****************
****************
ignore the following if you are not interested on how I tried
****************
****************
(Pdb) n
/home/fred/python/practic/window_08.py(12)__init__()

-> self.master.geometry('200x150+300+225')
(Pdb) p root.title
<bound method Tk.wm_title of <Tkinter.Tk instance at 0xb717c16c>>
(Pdb) p root.title[Tk.wm_title]
*** TypeError: <exceptions.TypeError instance at 0xb717c3cc>
(Pdb) p root.title[wm_title]
*** NameError: <exceptions.NameError instance at 0xb717c3cc>
(Pdb) p root[wm_title]
*** NameError: <exceptions.NameError instance at 0xb717c3cc>
(Pdb) p root['wm_title']
*** TclError: <_tkinter.TclError instance at 0xb717c3cc>
(Pdb) p self.master[title]
*** NameError: <exceptions.NameError instance at 0xb717c3cc>
(Pdb) p self.master['title']
*** TclError: <_tkinter.TclError instance at 0xb717c40c>
(Pdb) p self.master["title"]
*** TclError: <_tkinter.TclError instance at 0xb717c42c>
(Pdb) p self.master[wm_title]
*** NameError: <exceptions.NameError instance at 0xb717c42c>
(Pdb) p self.master['wm_title']
*** TclError: <_tkinter.TclError instance at 0xb717c3cc>
(Pdb) p self.master["wm_title']
*** SyntaxError: <exceptions.SyntaxError instance at 0xb717c3cc>
(Pdb) p self.master["wm_title"]
*** TclError: <_tkinter.TclError instance at 0xb717c40c>
(Pdb) q
Traceback (most recent call last):
File "./window_08.py", line 65, in ?
main(root)
File "./window_08.py", line 12, in __init__
self.master.geometry('200x150+300+225')
File "./window_08.py", line 12, in __init__
self.master.geometry('200x150+300+225')
File "/usr/lib/python2.4/bdb.py", line 48, in trace_dispatch
return self.dispatch_line(frame)
File "/usr/lib/python2.4/bdb.py", line 67, in dispatch_line
if self.quitting: raise BdbQuit
bdb.BdbQuit
****************
****************
May 18 '06 #1
1 1672
Hello Gary,
(Pdb) p root.title
<bound method Tk.wm_title of <Tkinter.Tk instance at 0xb717c16c>>
(Pdb) p root.title[Tk.wm_title]


Looks like "title" is a function, try "p root.title()"

HTH,
Miki
http://pythonwise.blogspot.com/

May 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3142
by: Kevin | last post by:
I have a document, lets say: <Doc> <Ele1 Att1='hello'> <Ele2 Att2='goodbye'/> </Ele1> </Doc> In XSLT I need to generate an attribute value which contains part of this document as a text...
0
1149
by: Alexander | last post by:
Please, excuse me if the question is a basic one but I have not found any hint neither on XML4C samples, nor on Apache site. I'm using XML4C. I'm parsing an xml file and I'm getting to an attribute...
12
1764
by: Adam Lipscombe | last post by:
Folks, I need to get the contents of a form attribute. In Read/Write mode this is field, so I can use getElementById("name").value In ReadOnly this is just plain text, so I can use...
5
2151
by: Don | last post by:
Hi: I have created an xsd from my xml document. I pop this xsd in the following directory: C:\program files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml. That give me...
6
1801
by: Michael | last post by:
Hi All, I need a few suggestions. I have the following XML segment: <LookUp> <ControlType>CheckBoxGroup</ControlType> <DBField>LastMedDate</DBField> <ControlName>cmbGoal1</ControlName> <Values...
1
2880
by: John Wilhelm | last post by:
I'm having a problem in by VB.net 2005 application. When i try to get a node from my app.config file the node come back with "nothing". The xmldocment loads OK, but I can't retrive a node. The...
6
3326
by: Charleees | last post by:
Hi all, I have a DropDown and a TextBox just bekeow it... I have to get the selected value from dropdown and set it as textBox Text.. The thing is i have to do this Without PostBack..... ...
6
2784
by: WT | last post by:
Hello, Using VS2005. I have an assembly library that can be called from a Web site asp.net application or from a winform application. From this library I need to retrieve a path using simply a...
0
2613
by: rautsmita | last post by:
hello friends , i am using to jdk6 and JAXB2.0, i have geomtry.xsd file i am trying to compile this file using jaxb but i got some error i.e.The particle of the type is not a valid restriction of...
0
2897
by: buntyindia | last post by:
Hi, I have a very strange problem with my application. I have developed it using Struts. I have a TextBox With Some fixed value in it and on Submit iam passing it to another page. <html:form...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7371
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7517
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5676
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5077
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1583
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.