IPython has a magic called %timeit that does exactly what you need. We
could add an option to our Preferences pane to run it by default.
Cheers,
Carlos
El 02/06/13 01:25, anatoly techtonik escribió:
On Monday, May 27, 2013 2:33:42 PM UTC+3, Aeronaelius wrote:
Well, what I want is already possible in a way. Like you said by
setting the script to run in its own dedicated interpreter the
timer starts when the interpreter is born and stops when the
script is finished. However that is only possible IF you do not
add the option to interact with the interpreter after the script
has finished (as I said before). So basically what could be done
is to do the same for when the interaction option is selected.
Another way is to make Spyder print the elapsed time to the
console only once when the script has finished (having that as a
Spyder in-build option rather than writing the code yourself).
I'd say that would be convenient. I guess the main problem here is to
detect if a script is finished with selected interaction option. If I
understand it right, the interpreter doesn't signal when script
finished and can not detect the phase itself.
--
You received this message because you are subscribed to the Google
Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.