473,406 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Re: Would this be called a bug in inspect ?

Gabriel Genellina wrote:
En Tue, 30 Sep 2008 14:57:55 -0300, Stef Mientki
<st**********@gmail.comescribió:
>I'm not familiar with inspect,
but I get an error (see below) in
getmembers ( wx )

Of course this is bug in wx .

Yes.
>But would you also call this a bug in inspect ?
(inspect crashes and doesn't continue with th rest of the code, nor
it returns the already gathered data)

getmembers works fine; try m=getmembers(wx) and see.
REALLY GREAT !
It fails when you attemp to print (or pprint) the returned list.
But this is fully beyond my understanding:

m = getmembers ( wx )
print m
runs fine
print getmembers ( wx )
crashes

but not always:
>>print getmembers (wx)
[('ACCEL_ALT', 1), ('ACCEL_CMD', 2), ('ACCEL_CTRL', 2), ('ACCEL_NORMAL',
0), ('ACCEL_SHIFT', 4), ('ADJUST_MINSIZE', 0), (

And to make it even weirder, now I can let your suggestion crash too
>>m=getmembers(wx)
print getmembers (wx)
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "P:\Python\lib\site-packages\wx-2.8-msw-unicode\wx\_gdi.py", line
242, in __repr__
def __repr__(self): return 'wx.Colour' +
str(self.Get(True))
File "P:\Python\lib\site-packages\wx-2.8-msw-unicode\wx\_gdi.py", line
230, in Get
return _gdi_.Colour_Get(*args, **kwargs)
TypeError: in method 'Colour_Get', expected argument 1 of type 'wxColour *'
>>print m
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "P:\Python\lib\site-packages\wx-2.8-msw-unicode\wx\_gdi.py", line
242, in __repr__
def __repr__(self): return 'wx.Colour' +
str(self.Get(True))
File "P:\Python\lib\site-packages\wx-2.8-msw-unicode\wx\_gdi.py", line
230, in Get
return _gdi_.Colour_Get(*args, **kwargs)
TypeError: in method 'Colour_Get', expected argument 1 of type 'wxColour *'

??????
thanks,
Stef
Sep 30 '08 #1
0 1620

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

Similar topics

1
by: Florian Link | last post by:
Purpose: Dynamically multiplex PyMethodDefs to QT Slots Hi, I would like to create a PyObject using the C API which can dispatch calls to it's methods to just ONE C function, which then...
1
by: Thomas Guettler | last post by:
Hi, the line numbers of inspect.getinnerframes are different from traceback.format_exception. This results in wrong lines being shown in cgitb. An example is below. I looked at the...
11
by: It's me | last post by:
I discovered the hardway what inspect.isclass() is doing. Consider this no brainer code: ### import inspect class Abc: def Hello(self): return
4
by: Benjamin Rutt | last post by:
I'm trying to learn about introspection in Python. my ultimate goal is to be able to build a module "text database" of all modules that are in the sys.path, by discovering all candidate modules...
20
by: alainpoint | last post by:
Hi I wonder if Python is capable of the following: define a function which returns its argument. I mean: def magic_function(arg): ...... some magic code ... that behaves the following way:
2
by: 63q2o4i02 | last post by:
Hi, I've written a top-down recursive decent parser for SPICE circuit descriptions. For debugging purposes, I wanted each production rule/function to know what its own name was, so at the...
11
by: Michele Simionato | last post by:
The subject says it all, I would like a script to act differently when called as $ python script.py and when called as $ python -i script.py. I looked at the sys module but I don't see a way to...
4
by: Chris Pax | last post by:
Hello, I recently been trying to use the inspect module to inspect the arguments of gtk objects, such as gtk.Button. I tried like this: inspect.getargspec(gtk.Button.__init__) and get the...
0
by: Stef Mientki | last post by:
hello, I'm not familiar with inspect, but I get an error (see below) in getmembers ( wx ) Of course this is bug in wx . But would you also call this a bug in inspect ?
0
by: Gabriel Genellina | last post by:
En Tue, 30 Sep 2008 14:57:55 -0300, Stef Mientki <stef.mientki@gmail.com> escribió: Yes. getmembers works fine; try m=getmembers(wx) and see. It fails when you attemp to print (or pprint)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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
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...
0
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
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...

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.