Getting to know Python
Adrian Eyre
a.eyre at optichrome.com
Wed Sep 29 07:19:20 EDT 1999
> How do I access the shell from the interpreter to enter commands like
> clear, ls, cp, etc.
If you're using a shell with job control, I'd cheat, and do this:
bash[87]$ python
Python 1.5.1 (#1, Oct 8 1998, 14:38:24) [C] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> print "Hello world"
Hello world
>>> ^Z
[1]+ Stopped python
bash[88]$ ls
mail/ root@ u@ otherstuff@
bin@ tmp/
bash[89]$ fg
python
>>> print "Hello world"
Hello world
--------------------------------------------
Adrian Eyre <mailto:a.eyre at optichrome.com>
Optichrome Computer Solutions Ltd
Maybury Road, Woking, Surrey, GU21 5HX, UK
Tel: +44 1483 740 233 Fax: +44 1483 760 644
http://www.optichrome.com
--------------------------------------------
More information about the Python-list
mailing list