Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80847 > unrolled thread

Where is inspect() located?

Started byIgor Korot <ikorot01@gmail.com>
First post2014-11-15 23:12 -0500
Last post2014-11-15 23:12 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Where is inspect() located? Igor Korot <ikorot01@gmail.com> - 2014-11-15 23:12 -0500

#80847 — Where is inspect() located?

FromIgor Korot <ikorot01@gmail.com>
Date2014-11-15 23:12 -0500
SubjectWhere is inspect() located?
Message-ID<mailman.15863.1416111601.18130.python-list@python.org>
Hi, ALL,

C:\Documents and Settings\Igor.FORDANWORK\Desktop\winpdb>python
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from a.b import c
>>> print c.classA
<class 'a.b.c.classA'>
>>> inspect.getmembers(c.classA)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'inspect' is not defined
>>> import lib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named lib
>>>

In the https://docs.python.org/2/library/inspect.html, it says it is
located in Lib/inspect.py.

What am I missing? Or its only for 3.x?

Thank you.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web