Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'win32': 0.03; 'importerror:': 0.07; 'here?': 0.09; 'imported': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'wrote': 0.14; 'igor': 0.16; 'nameerror:': 0.16; 'received:80.91.229.3': 0.16; 'received:97': 0.16; 'received:plane.gmane.org': 0.16; 'all,': 0.19; 'bit': 0.19; 'module': 0.19; 'import': 0.22; 'print': 0.22; "haven't": 0.24; 'question': 0.24; 'defined': 0.27; 'header:X-Complaints-To:1': 0.27; '"",': 0.31; '>>>>': 0.31; 'inspect': 0.31; 'file': 0.32; '(most': 0.33; 'subject:?': 0.36; 'hi,': 0.36; 'to:addr:python- list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'called': 0.40; 'name': 0.63; 'more': 0.64; 'subject:Where': 0.84; 'subject::': 0.85; '2013,': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dave Angel Subject: Re:Where is inspect() located? Date: Sat, 15 Nov 2014 23:36:15 -0500 (EST) Organization: news.gmane.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 97.73.240.77 X-Newsreader: PiaoHong.Usenet.Client.VIP:1.65 X-Archive: encrypt X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416112573 news.xs4all.nl 2836 [2001:888:2000:d::a6]:43141 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:80849 Igor Korot Wrote in message: > 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 > And what is your question here? >>>> inspect.getmembers(c.classA) > Traceback (most recent call last): > File "", line 1, in > NameError: name 'inspect' is not defined That's because you haven't imported it. >>>> import lib > Traceback (most recent call last): > File "", line 1, in > ImportError: No module named lib The module is called inspect. import inspect > -- DaveA