@Sylvain: I've just changed the warning message @Uwe: the best behavior would be to wait until the IPython client is ready but it would require some coding (let's continue this in v2.3)
@Steve: I agree that it's a bit late to introduce this kind of behavior change. @All: I've just had an idea of how we could settle this matter for both beginners and advanced users. We could: 1. reintroduce the old "Run in current (Python/IPython )console" action (Alt+F5, for example) as an additional action in "Run" menu/toolbar. 2. the current "Run" action (F5) will remain unchanged (with the old default behavior, i.e. "run in a dedicated interpreter" enabled but with "always show on a first rerun" disabled) So, Carlos, Uwe, you may suggest to your students to use Alt+F5 instead of F5: a. Use F5 to run a script in a clean/dedicated Python interpreter: this is recommended for developing applications b. Use Alt+F5 to run a script in current Python interpreter: this is recommended for interactive computing => No unpleasant/unexpected change for current (or advanced) users. => Easier for beginners who would probably use Alt+F5 more often than F5 What do you think about this suggestion? 2013/4/29 Steve <[email protected]> > Does it make sense for spyder to just complain about no open interpreter > (and not just go ahead and launch a new one)? Does the ipython interpreter > never close? I'm not seeing how this change makes anything easier for new > users beyond the initial run unless you're assuming all new users use > ipython and those interpreter sessions never close. Otherwise they're > going to be met with the dialog complaining that no interpreter is open and > they're going to have to learn about these concepts anyways. > > I understand the desire to help new users, but sneaking a software > behavior change into an RC just before release is a good way to introduce > breakage and confusion for current users. > > > On Sunday, April 28, 2013 5:19:17 PM UTC-5, Sylvain Corlay wrote: >> >> Hi Pierre, >> I think that the current error message is a bit misleading in the case >> where there is a shell opened but it does not have the focus. For example, >> if there is an ipython console opened but the standard console widget is >> selected. >> Something in this spirit of >> "No Python shell is currently selected to run stuff.py, please select or >> open a new python interpreter." >> woud maybe be more clear. >> Best, >> Sylvain >> >> On Sunday, April 28, 2013 11:23:51 AM UTC-4, Pierre Raybaut wrote: >>> >>> 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=** >>> c1e17dc89477f27cd251fb59340a06**7eaa45b9f8<https://code.google.com/p/spyderlib/source/detail?r=c1e17dc89477f27cd251fb59340a067eaa45b9f8> >>> and point 2 there: >>> https://code.google.com/p/**spyderlib/source/detail?r=** >>> 00e148391c5b454b8c144fd1553b0a**2155be8e12<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]> >>> >>>> 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]> >>>> >>>>> 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]**. >>>>>> To post to this group, send email to [email protected]. >>>>>> Visit this group at >>>>>> http://groups.google.com/**group/spyderlib?hl=en<http://groups.google.com/group/spyderlib?hl=en> >>>>>> . >>>>>> For more options, visit >>>>>> https://groups.google.com/**groups/opt_out<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<http://groups.google.com/group/spyderlib?hl=en> >>>>> . >>>>> For more options, visit >>>>> https://groups.google.com/**groups/opt_out<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<http://groups.google.com/group/spyderlib?hl=en> >>>> . >>>> For more options, visit >>>> https://groups.google.com/**groups/opt_out<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<http://groups.google.com/group/spyderlib?hl=en> >>>> . >>>> For more options, visit >>>> https://groups.google.com/**groups/opt_out<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.
