On Mar 13, 9:08 pm, David Verelst <[email protected]> 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
>
> On 13 March 2011 15:14, Pierre Raybaut <[email protected]> wrote:
>
>
>
>
>
>
>
> > [Update]
>
> > Recent changes:
> >    * fixed expand/collapse bug (expanding/collapsing buttons)
> >    * implemented the editor-link (clicking on a tree item will open
> > the associated file/line number)
>
> > -Pierre
>
> > On Mar 13, 2:40 pm, Pierre Raybaut <[email protected]> wrote:
> > > Hi all,
>
> > > I've added today to the development version (v2.1.0dev) this new
> > > impressive contribution from Santiago Jaramillo: the profiler plugin.
>
> > > You may test it by pressing F10 ("Run" menu > "Profile code").
> > > Some features are still missing (but probably not for long):
> > >     * profiling results are not saved
> > >     * tree items are not yet linked to the editor (to open the
> > > associated file)
> > >     * ...
> > > But I'm wasting my time here because the developer of this third-party
> > > plugin has even wrote a documentation:
> >http://sjara.github.com/spyder-profiler/
> > > As you'll see, the developer is quite open-minded, so I invite you to
> > > participate to this discussion if you have any opinion on this plugin
> > > (bugs, new features, ...).
>
> > > The original source code repository is here, but note that it's
> > > outdated (since today and changes that were applied to the code for
> > > proper integration in Spyder's current development version):
> >https://github.com/sjara/spyder-profiler
>
> > > That is a great contribution, thanks a lot Santiago.
>
> > > -Pierre
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "spyder" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group at
> >http://groups.google.com/group/spyderlib?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/spyderlib?hl=en.

Reply via email to