Can you confirm the ipython behavior? Does the interpreter normally stay
open forever thus allowing additional runs to happen in the same
interpreter?
On Monday, April 29, 2013 10:42:56 AM UTC-5, Carlos Córdoba wrote:
>
> Thanks Sylvain for the detailed explanation. I'll fix the problem you
> report ASAP.
>
> Cheers,
> Carlos
>
> El 29/04/13 10:32, Sylvain Corlay escribió:
>
> I completely agree with the changes of Carlos and the additions of Pierre
> regarding this behavior. I am trying to convince people to switch from
> environment like matlab and I think that this change is both minor,
> harmless and helps beginners.
>
> However, the problem I mentioned earlier is a bug to me. It is a
> problem of focus:
>
> If you have both the console widget and the ipython console widget
> opened, with the cursor/focus in the python widget and you click on ipython
> console tab, the pure python console keeps the focus and further hits on
> the run button will be executed in the console. When the one does the
> reverse (put the cursor in the ipython console and click on a normal python
> console tab), the focus moves as expected to the python console.
>
> I hope I was clear. I think that this is probably a one line fix. I can
> try to look at it.
>
> Cheers,
>
> Sylvain
>
> On Sunday, April 28, 2013 6:19:17 PM UTC-4, 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=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]>
>>>
>>>> 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.
>>>>>> 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.
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> 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] <javascript:>.
> To post to this group, send email to [email protected]<javascript:>
> .
> 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.