From: SourceForge.net <no...@so...> - 2003-08-25 12:14:42
|
Bugs item #794193, was opened at 2003-08-24 18:56 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=794193&group_id=78018 Category: pythonwin Group: None Status: Open Resolution: None Priority: 5 Submitted By: Malte Forkel (mforkel) Assigned to: Nobody/Anonymous (nobody) Summary: Pythonwin module browser has problem with top level function Initial Comment: After upgrading from Python 2.2 to Python 2.3, I noticed that in the module browser all top level functions are simply shown as instances of pyclbr.Function. These list entries can't be used to locate the function definition in the source code. I tried win32all builds 155 and 157 with Python 2.3.0.0 on a Windows 2000 machine. I managed to fix the problem by adding the following __init__ function to HierListCLBRFunction in ModuleBrowser.py: def __init__(self, clbrclass, suffix = ""): try: name = clbrclass.name file = clbrclass.file lineno = clbrclass.lineno except AttributeError: name = clbrclass file = lineno = None self.super = [] self.methods = {} HierListCLBRItem.__init__(self, name, file, lineno, suffix) This code is a variation on the HierListCLBRClass.__init__ function. I guess the problem is caused by instances of pyclbr.Function not having the attributes 'super' and 'name' that are accessed in HierListCLBRClass.__init__. The AttributeError error handling code will then set locals 'name', 'file', and 'lineno' to None. I attach an edited version of ModuleBrowser.py, based on win32all build 155. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=794193&group_id=78018 |