Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #55087
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2013-09-30 09:45 -0700 |
| References | <1cac668a0906101201g3de1d3a4w8842678398dcb236@mail.gmail.com> <mailman.1410.1244677726.8015.python-list@python.org> |
| Message-ID | <80889ac7-8bdc-4b81-861b-b4833440d181@googlegroups.com> (permalink) |
| Subject | Re: Restart the interactive python shell like in IDLE |
| From | Ricardo Abreu <gumbeto@gmail.com> |
On Thursday, June 11, 2009 1:48:42 AM UTC+2, Chris Rebert wrote: > On Wed, Jun 10, 2009 at 12:01 PM, Matt Burson<msburson@gmail.com> wrote: > > Is there a way to reproduce the behavior of IDLE's restart shell ability by > > using a function? I thought there would be since you can exit python by > > executing the simple quit() function I thought there would be an equally > > simple function name something like restart(). I'd prefer something like > > this as opposed to having to exit the shell and then start it up again to > > refresh it. > > I believe IDLE itself implements the "restart" capability by killing > and re-launching its Python interpreter subprocess, so it's not like > it's using some hidden capability of Python to accomplish this. > Is doing Ctrl+D, up-arrow, Enter really that hard? It's even fewer > keystrokes than "restart()"... > > Cheers, > Chris > -- > http://blog.rebertia.com You might be launching python from something else other than a shell and it might be harder to re-launch it from there
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Restart the interactive python shell like in IDLE Ricardo Abreu <gumbeto@gmail.com> - 2013-09-30 09:45 -0700
csiph-web