473,413 Members | 1,731 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,413 software developers and data experts.

using inspect on pygtk

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 fallowing error:

File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/inspect.py", line 743, in getargspec
raise TypeError('arg is not a Python function')
TypeError: arg is not a Python function
I have been trying to do this through code so that I don't have to
have a list of all possible gtk classes and their arguments.

Sep 29 '07 #1
4 1373
On Sep 28, 9:57 pm, Chris Pax <christopher....@gmail.comwrote:
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 fallowing error:

File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/inspect.py", line 743, in getargspec
raise TypeError('arg is not a Python function')
TypeError: arg is not a Python function

I have been trying to do this through code so that I don't have to
have a list of all possible gtk classes and their arguments.
does anybody have any idea?

Oct 1 '07 #2
>I recently been trying to use the inspect module
to inspect the arguments of gtk objects, such as gtk.Button.
....

does anybody have any idea?
Chris ....

You might try the following newsgroup on the Gmane server
for Python / Gtk questions ....

gmane.comp.gnome.gtk+.python
--
Stanley C. Kitching
Human Being
Phoenix, Arizona
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Oct 1 '07 #3
On 9/29/07, Chris Pax <ch*************@gmail.comwrote:
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 fallowing error:

File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/inspect.py", line 743, in getargspec
raise TypeError('arg is not a Python function')
TypeError: arg is not a Python function
What you are seeing is completely normal. inspect.getargspec(sys.exit)
gives the same result. PyGTK is a wrapper around the GTK+ C library
and since all the code is written in C, inspect can't infer anything
about the function gtk.Button.__init__.

--
mvh Björn
Oct 1 '07 #4
On Oct 1, 12:53 pm, "BJörn Lindqvist" <bjou...@gmail.comwrote:
On 9/29/07, Chris Pax <christopher....@gmail.comwrote:
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 fallowing error:
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/inspect.py", line 743, in getargspec
raise TypeError('arg is not a Python function')
TypeError: arg is not a Python function

What you are seeing is completely normal. inspect.getargspec(sys.exit)
gives the same result. PyGTK is a wrapper around the GTK+ C library
and since all the code is written in C, inspect can't infer anything
about the function gtk.Button.__init__.

--
mvh Björn
ok thank you very much for answering my question.
so, i guess that there is no way to do this via code.. oh well

Oct 1 '07 #5

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

Similar topics

4
by: j_mckitrick | last post by:
I am having a problem with combo boxes. If I am using an XML glade2 file for my gui definition, what is the command I need to use to access a given combo box and determine the currently selected...
4
by: j_mckitrick | last post by:
Hi all. Here is a tiny container for one of each combo box, along with the glade file. Just 2 widgets, so hopefully not too large. How the heck do I get the selection from the ComboBox, as...
6
by: Mark Mitchell | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have a program written in python that tells me it requires PyGTK, so I DLed, ./configure, make, make install and the process seems to go ok. Some...
1
by: Thomas Bartkus | last post by:
I am experimenting (flailing around?) with glade and python. Both under MS Windows and Linux. I understand why I want to "import gtk" It gives me access to the critical gui program loop...
14
by: Rod W | last post by:
I'm just starting out on Python but my primary goal is to provide applications with some user interface (GUI). Can someone point me to a good comparison of whether I should use wxPython (with...
0
by: Richard Taylor | last post by:
User-Agent: OSXnews 2.07 Xref: number1.nntp.dca.giganews.com comp.lang.python:437315 Hi I am trying to use py2app (http://undefined.org/python/) to package a gnome-python application...
1
by: krishnakant Mane | last post by:
hello, I will be writing some code in PyGTK to run on linux. but I want to know if there are any installers or distutils available for PyGTK on windows? I have heard that installing gimp or even...
0
by: He Jibo | last post by:
Hi, Everyone, Could someone help me how to install pygtk? I get some problems with it. Here is the error I get while install pygtk: https://netfiles.uiuc.edu/jibohe2/error.GIF?uniq=-k6678k ...
0
by: rajasankar | last post by:
Hi, I am using Jython based application and trying to use inspect.py in the python files. Here is my code import inspect,os,sys,pprint,imp def handle_stackframe_without_leak(getframe): ...
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?
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
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
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
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.