Hello,
I tested your change and it is going into the correct direction.
But one problem remains:
I have enabled "open an ipython console at startup" in the preferences.
If I now run a script with F5, close spyder, start it again and immediately
press F5 again I get the message:
"
No Python shell is currently available to run Hello2.py.
Please open a new Python interpreter and try again.
"
This message appears, because it takes a second or a few seconds, until
the ipython console appears.
If I wait until the console appears and press F5 again, than this message
appears again. And this is wrong: I have already an open ipython console,
why should I open a new instance?
I have to click into the ipython console and than I can run the script with
F5.
So either the message should be changed to:
"Please click into an existing console or open a new one."
Or, preferably the execution of the F5 command should be delayed until
there is an open console (under the condition, that ipython is just launching).
Best regards:
Uwe Fechner
Am 28.04.2013 17:23, schrieb Pierre Raybaut:
Ok, I understand your point of view and I think that it's probably best to keep it that way for
beginners.
This odd behavior I found out ("Re-run" a script in current interpreter fails silently if there is
no running interpreter) is actually a bug which is not produced by your recent change: this recent
change of behavior is only making it happen more easily. So, no worry, really.
I see two actions that would need to be taken care of to close this issue:
1. Warn the user (with a warning pop-up dialog box) if the current "Run settings" is set to "Run
in current interpreter" *and* if there is no interpreter currently running. This will avoid the
"Run" command to fail silently.
2. Show the "Run settings" the first time a script is ever run, so that every one will be fully
conscious of the new default behavior (run in current interpreter) and the new "show Run Settings
at each run" check box. Beginners will directly click on the "Run" button without changing
anything and the dialog won't show again so that they won't be troubled by this mysterious choice
again.
I've implemented point 1 here:
https://code.google.com/p/spyderlib/source/detail?r=c1e17dc89477f27cd251fb59340a067eaa45b9f8
and point 2 there:
https://code.google.com/p/spyderlib/source/detail?r=00e148391c5b454b8c144fd1553b0a2155be8e12
With those minor changes above, I'm ok with this new behavior!
-Pierre
2013/4/28 Carlos Córdoba <[email protected] <mailto:[email protected]>>
Hi Pierre,
Good to hear from you again! I gave a lot of thought to this change, and I
didn't want to do
it so close to the final release, but I was busy fixing other complex bugs.
From the source code point of view, things are almost exactly as before: I
just changed the
dialog's default to "current interpreter" and added a checkbox to let the
user decide between
the old and the new behavior, so the bug you mention was most probably
there before.
Experienced or old time users can mark the mentioned checkbox and things
for them will be as
they always have been. But newbies (as Uwe mentions) will have a much
easier and pleasant time
with Spyder without being confronted with a complex set of options from the
start.
I hope you understand my motivation: my aim is to lead Spyder to a wider
audience, i.e. people
who is learning or giving their first steps with Python, but maintaining
all the
configurability and adaptability it currently has.
I'll work hard to solve any bugs that show up (starting with yours :-) and
time will tell if I
took the right decision or not.
Cheers,
Carlos
El 28/04/13 07:58, Pierre Raybaut escribió:
Carlos,
I'm quite busy these days and I've just played around with latest Spyder
revision, just to
fix Issue 1363 (for which you asked for my help). Doing so, I've been
confronted to this new
behavior of the 'Run configuration' dialog which has been renamed to 'Run
settings' (why
not). First, I find it very risky to introduce a change of behavior of this
magnitude at this
stage of 2.2 release process (Release Candidate). Second, I was confronted
in less than 5
minutes to a bug (an unexpected behavior actually) related to this change:
when executing a
program which kills the Python process (hard crash or a simple call to
sys.exit), Spyder
seems to be unresponsive and unable to re-run it as the current interpreter
has been
terminated... So, that's how I've discovered this new behavior, a quite
unpleasant experience.
I really think that such changes should have been introduced at an early
stage of
development, not just before releasing the final 2.2.
Cheers,
Pierre
2013/4/27 Carlos Córdoba <[email protected]
<mailto:[email protected]>>
I made the change so that after pressing F5 on new files, they always
be evaluated in the
current interpreter (Python or IPython). I just checked that it's
working as I designed
it (on Windows and Linux), i.e. If you press F5 again, then the file
will be ran again in
the selected console with the "runfile" function.
I did it because I saw (in my courses and workshops) that people gets
easily confused
with the "Run dialog" and don't know what option to select. Besides,
now that we have a
very good IPython integration, I expect most people will take advantage
of it and won't
need the "Execute in a new dedicated python interpreter" option.
However, if you want to get back the old behavior, you can mark the
checkbox at the end
of the dialog that reads:
"Always open this dialog on a first file run".
Cheers,
Carlos
El 26/04/13 17:04, Steve escribió:
I saw some commits in the change log recently related to the Run
Settings. One of
the changes leads to unexpected behavior.
It appears the default interpreter option changed. I just rolled
back to an old
commit to confirm. The radio button for "Execute in a new
dedicated python
interpreter" used to be selected by default. The new default is
"Execute in current
Python or IPython interpreter" is checked. Because of this new
default setting after
the initial run (F5) additional presses of F5 do nothing. I
finally figured this out
by realizing it was new files and it must have to do with the run
config for new
files versus files I had previously debugged. I think don't think
new behavior is
optimal.
-Steve
--
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]
<mailto:spyderlib%[email protected]>.
To post to this group, send email to [email protected]
<mailto:[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]
<mailto:spyderlib%[email protected]>.
To post to this group, send email to [email protected]
<mailto:[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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[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]
<mailto:spyderlib%[email protected]>.
To post to this group, send email to [email protected]
<mailto:[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.
--
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.