diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2001-07-16 05:50:45 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2001-07-16 05:50:45 (GMT) |
commit | 91e476f297cf84f21d10ffba437360869ee12d5a (patch) | |
tree | 1fc01777da65cfb56f6fde123c4dedfd6e89b2d6 /Lib | |
parent | fe2127d3cbf34452a10b88c40e5ab06870936f94 (diff) | |
download | cpython-91e476f297cf84f21d10ffba437360869ee12d5a.zip cpython-91e476f297cf84f21d10ffba437360869ee12d5a.tar.gz cpython-91e476f297cf84f21d10ffba437360869ee12d5a.tar.bz2 |
Add a script "idles" which opens a Python Shell window.
The default behaviour of idlefork idle is to open an editor window instead
of a shell. Complex expressions may be run in a fresh environment by
selecting "run". There are times, however, when a shell is desired.
Though one can be started by "idle -t 'foo'", this script is more
convenient. In addition, a shell and an editor window can be started
in parallel by "idles -e foo.py".
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/idlelib/idles | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/idlelib/idles b/Lib/idlelib/idles new file mode 100755 index 0000000..b2233b7 --- /dev/null +++ b/Lib/idlelib/idles @@ -0,0 +1,13 @@ +#! /usr/bin/env python + +import os +import sys +from idlelib import IdleConf + +idle_dir = os.path.dirname(IdleConf.__file__) +IdleConf.load(idle_dir) + +# defer importing Pyshell until IdleConf is loaded +from idlelib import PyShell +# open a shell instead of an editor window +PyShell.main(0) |