473,395 Members | 2,222 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,395 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 1617

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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
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,...

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.