-
- Posts: 49
- Joined: Tue Sep 29, 2015 1:14 am
Terminal v shell from Python RESOLVED
Shelling out from Python via os.system takes me to a screen much like terminal. What is/are the difference(s) if any?
Last edited by raspalanpi on Wed Oct 14, 2020 11:21 pm, edited 1 time in total.
Blundering in the darkness... But with your kind help there is light around the corner...
-
- Posts: 972
- Joined: Mon Apr 09, 2018 5:26 pm
- Location: N. Finland
Re: Terminal v shell from Python
They are both language interpreters. However, the one is also a primary interface to the operating system. With modifications the other could be too. I think IPython might be one such example. The default shell in Raspberry Pi OS is Bash, which is based on the Bourne shell. There are a lot of shells to choose from, beyond Bash: zsh, ksh, POSIX shell, fish, oilshell,
If you can tolerate PDFs, page 187 of the October 1983 issue of BYTE (page 189 of either PDF) has an article by the Bourne shell's author, Stephen R. Bourne:
https://vintageapple.org/byte/pdf/19831 ... 0_UNIX.pdf
https://archive.org/details/byte-magazine-1983-10
There is also a fairly good introduction to the Unix shell history even if it starts to diverge in recent years.
http://www.softpanorama.org/People/Shel ... tion.shtml
Don't worry about the layout colors.
If you can tolerate PDFs, page 187 of the October 1983 issue of BYTE (page 189 of either PDF) has an article by the Bourne shell's author, Stephen R. Bourne:
https://vintageapple.org/byte/pdf/19831 ... 0_UNIX.pdf
https://archive.org/details/byte-magazine-1983-10
There is also a fairly good introduction to the Unix shell history even if it starts to diverge in recent years.
http://www.softpanorama.org/People/Shel ... tion.shtml
Don't worry about the layout colors.
Re: Terminal v shell from Python
What did you give as the argument to os.system() ???raspalanpi wrote: ↑Mon Oct 12, 2020 10:57 pmShelling out from Python via os.system takes me to a screen much like terminal. What is/are the difference(s) if any?
For example, if I give bash, I just get a normal bash shell:-
Code: Select all
pi@raspberrypi:~ $
pi@raspberrypi:~ $
pi@raspberrypi:~ $ python3
Python 3.9.0 (default, Oct 12 2020, 03:48:08)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.system("bash")
pi@raspberrypi:~ $
pi@raspberrypi:~ $ echo hello
hello
pi@raspberrypi:~ $ exit
0
>>>
>>>
Pi4 8GB and Pi4 4GB running Raspberry Pi OS 64-bit
OT: Re: Terminal v shell from Python
@tpyo kingg
WOW extreme nostalgic moment, I used to have hundreds of those and similar magazines in my garden shed until a house move meant they had to go. Didn't know that they (Byte) had been archived on the Net.
Thanks for the link.
WOW extreme nostalgic moment, I used to have hundreds of those and similar magazines in my garden shed until a house move meant they had to go. Didn't know that they (Byte) had been archived on the Net.
Thanks for the link.

E8 85 A2 40 C9 40 81 94 40 81 95 40 89 84 89 96 A3
Still NF Shirls
Still NF Shirls