Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

Debugger (win and idle) (PR#283)

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


musingattheruins at yahoo

Apr 10, 2000, 9:30 AM

Post #1 of 1 (47 views)
Permalink
Debugger (win and idle) (PR#283)

Full_Name: Bill Mailloux
Version: 1.5.2
OS: Win32
Submission from: (NULL) (216.91.23.226)


The python debugger (both Idle and PythonWin) does not undertand packages. Can
run scripts from the command line that cannot be run in the debugger...

Create package 'Test' in the directory "My Modules", add an __init__.py (empty)
to the directory "My modules\Test", create file testfile.py with the
contents...

class TheTest:
def __init__(self):
self.i = 1

def go(self):
return self.i

Add the path to the Python path with the following file (test.reg)...

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5\PythonPath\TheTest]
@="C:\\My modules"

then try the following at the python prompt:

import Test.testfile
j = Test.testfile.TheTest()
k = j.go

runs fine right? Yes it does, now step through it in the debugger and you
get...

import Test.testfile
j = Test.testfile.TheTest() #exception: attribute 'TheTest'
k = j.go

Does not appear to be realted to the class (you can change it to a 'function in
a module' instead of a 'method in a class in a module' and you get the a similar
result.)

Debugger does not understand packages.

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.