[Eric] Stepping through programs containing package imports which are in .egg format

Detlev Offenbach detlev at die-offenbachs.de
Wed Mar 11 18:28:17 GMT 2009


On Dienstag, 10. März 2009, Geert Vancompernolle wrote:
> Detlev Offenbach wrote:
> > On Sonntag, 8. März 2009, Geert Vancompernolle wrote:
> >> Hi,
> >>
> >> Just installed the package Elixir to be able to follow a nice tutorial I
> >> found on the web (http://lateral.netmanagers.com.ar/stories/BBS47.html).
> >>
> >> After running the command "setup.py install" for the Elixir package, the
> >> resulting file is called "Elixir-0.6.1-py2.6.egg" and is stored in the
> >> directory <python_installation>/Lib/site-packages.
> >>
> >> However, while debugging an application that has the "from elixir import
> >> *" statement, I get the following error message popping up when trying
> >> to step into (not step over, because that doesn't give any problems!!!)
> >> the elixir package:
> >>
> >> "the file build\bdist.win32\egg\elixir\__init__.py could not be opened".
> >>
> >> I also have the same problem (but with other function names in the error
> >> message) if I want to step into (again, not step over, since that
> >> works!!!) code that calls functions from the elixir package.
> >>
> >> Example:
> >>
> >> The following statement:
> >>
> >> using_options( tablename='tasks' )
> >>
> >> is giving the error:
> >>
> >> "The file
> >> f:\appdata\_myprogramdata\programming\python\projects\todo\build\bdist.w
> >>in3 2\egg\elixir\statements.py could not be opened"
> >>
> >> Well, of course that file could not be opened, since I don't have it at
> >> that location.  But that file is referenced into the file
> >> "Elixir-0.6.1-py2.6.egg".
> >>
> >> If it's not possible to step into such .egg files, would it then be
> >> possible to prevent one from stepping into functions from that kind of
> >> packages?  It would make sense that F7 (step into) then would become
> >> "step over" (= F8) to prevent seeing this message.
> >
> > How can the debugger determine, if it would step into such a file?
>
> As said before, I have no experience with such .egg files.  But I can
> imagine (again, I"m not sure) that the debugger "knows" it steps into
> .py or .pyc files, so if it "sees" it will step into .egg files, ignore it.
>
> I don't know the ins and outs of the Python debugger in Eric4, it's just
> a hint.  Having an error and being kicked out (like it is the case now)
> is also not an option to me...

Egg files are problematic for debuggers. As you saw in your original report, 
the filename does not give any indication about the filename of the egg file. 
If that would be given, I could implement some logic. Maybe somebody on this 
list can give hints on how to tackle this issue.

Regards,
Detlev
-- 
Detlev Offenbach
detlev at die-offenbachs.de



More information about the Eric mailing list