Re: [spyder] Question About Updating Code and Re-running Interpreter

369 views
Skip to first unread message

Carlos Córdoba

unread,
Dec 26, 2012, 4:45:28 PM12/26/12
to spyd...@googlegroups.com
Hi Adam,

If you make changes on the editor, you need to reevaluate your file
using the F5 key so that they are recognized by the console.

Cheers,
Carlos

El 26/12/12 03:00, Adam Becker escribió:
>
> Hello.
>
> I've begun using Spyder earlier today and I've really enjoyed its GUI
> features.
>
> I do have a question:
>
> Whenever I update my code in the text-editor, simply typing:
>
> import file_name
> filename.code
>
> in the interpreter does not recognize the changes; for some reason,
> the changes are not recognized unless I restart the interpreter.
>
> I'm not sure what exactly I'm doing wrong - I appreciate any help.
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "spyder" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/spyderlib/-/WRLEmPv8n78J.
> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to
> spyderlib+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/spyderlib?hl=en.

Pierre-Henri

unread,
Dec 30, 2012, 5:00:47 PM12/30/12
to spyd...@googlegroups.com
Le samedi 29 décembre 2012 23:23:13 UTC+1, FENG Xu a écrit :
I got the same problem. F5 does not work for me. However, reload(file_name) seems to do the trick. But I am wondering why this is not automatic even when I turn on User Module Deleter. I am using Spyder under Ubuntu 12. 04. Can anyone help? thx


On Wednesday, December 26, 2012 3:00:25 AM UTC-5, Adam Becker wrote:

Hello.

I've begun using Spyder earlier today and I've really enjoyed its GUI features.

I do have a question:

Whenever I update my code in the text-editor, simply typing:

import file_name
filename.code

in the interpreter does not recognize the changes; for some reason, the changes are not recognized unless I restart the interpreter.

I'm not sure what exactly I'm doing wrong - I appreciate any help.



The first time you execute the module being edited, you have to choose between executing in a new python shell or an existing shell. If you want the User Module Deleter to do its job automatically, of course you have to make sure to execute the module in an existing shell, not a separate one...

What I couldn't find so far though is, if you made a mistake, how do one tell spyder to change the choice, so as for example, from now one, have spyder rerun the module being edited in the current python shell ?

Quitting spyder and running it again does not work, and I couldn't find anything in the menus. The only way I couldn't find was to look for initialization files for spyder and manually edit them (that is, .spyder.ini under .spyder2 or .spyder2-27, looking for "configurations")

That is rather ugly of course... What would be the proper way ?

Pierre-Henri

Jed Ludlow

unread,
Dec 30, 2012, 5:33:17 PM12/30/12
to spyderlib

Quitting spyder and running it again does not work, and I couldn't find anything in the menus. The only way I couldn't find was to look for initialization files for spyder and manually edit them (that is, .spyder.ini under .spyder2 or .spyder2-27, looking for "configurations")

That is rather ugly of course... What would be the proper way ?


The run configuration for the file currently active in the editor can be set by choosing "Run...Configure..." from the menus or by using the F6 keyboard shortcut.

Regards,

Jed

Pierre-Henri Jondot

unread,
Dec 31, 2012, 4:39:02 AM12/31/12
to spyd...@googlegroups.com
-- 

Thanks !

Regards,

Pierre-Henri

Carlos Córdoba

unread,
Dec 31, 2012, 5:57:24 PM12/31/12
to spyd...@googlegroups.com
We really need to write a "Hitchhiker's guide to Spyder"! ;-)

2012/12/31 Pierre-Henri Jondot <phjo...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "spyder" group.

Adam Boaz Becker

unread,
Feb 17, 2015, 12:02:18 PM2/17/15
to spyd...@googlegroups.com
Just saw this: thanks guys!
Reply all
Reply to author
Forward
0 new messages