On Mar 13, 9:08 pm, David Verelst <
david.vere...@gmail.com> wrote:
> Very nice indeed!
>
> I had to install python-profiler (ubuntu 10.04) to get spyder running again.
> I haven't really looked into it yet, but it is a bit strange that profiler
> was not included in my standard python installation (which is the stock
> ubuntu one).
That is very surprising indeed because cProfile and pstats (the Python
profiler modules) are included in the Python standard library.
But I've just read that the Python profiler (actually profile.py)
being not free according to Debian Free Software Guidelines (http://
bugs.debian.org/cgi-bin/bugreport.cgi?bug=293932), they decided to
split the standard library in (at least) two Debian packages (there
could be more, I didn't check).
To avoid this issue, we could consider using hotshot only (hotshot is
in the standard library and really free) instead of the couple
cProfile/pstats but the API seems far from user-friendly, especially
if we can't use pstats to handle the profiling data.
In the meantime, I've added a bugfix to handle the module requirement
in the profiler plugin:
(for the record, it was originally in Santiago's code and when merging
the code I've removed these lines thinking this was not necessary)
http://code.google.com/p/spyderlib/source/detail?r=9dc1c1473a45a22ee4c6b1ff1bdb492d334a134a
Thanks for the feedback,
-Pierre
> Traceback (most recent call last):
> File "/home/dave/Projects/spyderlib/spyderlib/spyder.py", line 1525, in
> main
> mainwindow = run_spyder(app, options)
> File "/home/dave/Projects/spyderlib/spyderlib/spyder.py", line 1461, in
> run_spyder
> main.setup()
> File "/home/dave/Projects/spyderlib/spyderlib/spyder.py", line 719, in
> setup
> for mod in get_spyderplugins_mods(prefix='p_', extension='.py'):
> File "/home/dave/Projects/spyderlib/spyderlib/config.py", line 498, in
> get_spyderplugins_mods
> for modname in get_spyderplugins(prefix, extension)]
> File "/home/dave/Projects/spyderlib/spyderplugins/p_profiler.py", line 24,
> in <module>
> from spyderplugins.widgets.profilergui import ProfilerWidget
> File "/home/dave/Projects/spyderlib/spyderplugins/widgets/profilergui.py",
> line 35, in <module>
> import sys, os, time, pstats
> ImportError: No module named pstats
>