473,671 Members | 2,558 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.tit le('parent')
self.master.geo metry('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.geo metry('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.Typ eError instance at 0xb717c3cc>
(Pdb) p root.title[wm_title]
*** NameError: <exceptions.Nam eError instance at 0xb717c3cc>
(Pdb) p root[wm_title]
*** NameError: <exceptions.Nam eError instance at 0xb717c3cc>
(Pdb) p root['wm_title']
*** TclError: <_tkinter.TclEr ror instance at 0xb717c3cc>
(Pdb) p self.master[title]
*** NameError: <exceptions.Nam eError instance at 0xb717c3cc>
(Pdb) p self.master['title']
*** TclError: <_tkinter.TclEr ror instance at 0xb717c40c>
(Pdb) p self.master["title"]
*** TclError: <_tkinter.TclEr ror instance at 0xb717c42c>
(Pdb) p self.master[wm_title]
*** NameError: <exceptions.Nam eError instance at 0xb717c42c>
(Pdb) p self.master['wm_title']
*** TclError: <_tkinter.TclEr ror instance at 0xb717c3cc>
(Pdb) p self.master["wm_title']
*** SyntaxError: <exceptions.Syn taxError instance at 0xb717c3cc>
(Pdb) p self.master["wm_title"]
*** TclError: <_tkinter.TclEr ror 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.geo metry('200x150+ 300+225')
File "./window_08.py", line 12, in __init__
self.master.geo metry('200x150+ 300+225')
File "/usr/lib/python2.4/bdb.py", line 48, in trace_dispatch
return self.dispatch_l ine(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 1680
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
3148
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 string, ie:
0
1160
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 which is not explicitly specified in the xml file. The parser brings me its default value specified in DTD (if any) as the attribute's value. The question is: How do I get the default value if the attribute explicitly appears in the xml file...
12
1780
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 getElementById("name").innerText. I need to do it dynamically though, so is there anyway I can look at the object returned by getElementById() and determine if it was a field or a
5
2159
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 intellisense when I specify the name space. But leaving hte namespace in messes up my transforms. Is there any way to get this intellisense functionality without adding the namespace all the time? Thanks,
6
1814
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 VALUE="0" BookMark="Goal1Progress"/> <Values VALUE="1" BookMark="Goal1NoProgress"/> <Values VALUE="2" BookMark="Goal1NA"/> </LookUp>
1
2893
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 app.config file is listed below and the code is listed below that, the line with "-->>" is where i try to get the node. Can anyone see where I'm going wrong. A dump of the xmlDocument is listed below the code. Note: "MyKey" is set to "Reports"
6
3335
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..... Is there any java script to do this functionality...
6
2799
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 key like 'libPath'. As far as winform and asp.net share the same common base class for settings, SettingsBase, how to manage this ? For winform the value should be set in app.config and for web site in
0
2624
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 the particle of the base this xsd file is valid as per w3c standard i am also providing error in detail and geometry.xsd file geometry.xsd <?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://www.opengis.net/gml"...
0
2910
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 action="/login"> <html:text property="userName" value="Bunty"/> <html:submit/>
0
8485
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8828
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8605
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8677
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6238
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2819
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 we have to send another system
2
2062
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1816
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.