Click here to Skip to main content
15,883,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm getting mixed answers, is Python a shell or isn't it? Python seems easier to understand than Bash but Bash is a "Shell" for Linux.

I'm writing a paper about Linux Shells and am confused on this point. I need an answer rather quickly please. Thanks in advance for any help.
Posted

Python is a programming language : http://en.wikipedia.org/wiki/Python_%28programming_language%29[^]

However it can be used within a shell.
 
Share this answer
 
Comments
CPallini 25-Aug-13 13:45pm    
5. Short and to the point.
Mehdi Gholam 25-Aug-13 13:48pm    
Thanks CPallini!
As Mehdi Gholam stated, it is a programming language and it can be used as shell, but it is quite inconvenient as such. It can be a shell because it has an interactive interface, but it is inconvenient because the main shell commands you normally use in a shell are method calls, it won't let you use pipes and other process related things easily, and because the syntax of the language is not adequate for writing short commands.
But there is an other aspect: you can use it efficiently as shell script language, as you don't need to use the same shell for the command line and for scripting. Just some examples: http://www.linuxjournal.com/content/python-scripts-replacement-bash-utility-scripts[^], http://www.jperla.com/blog/post/a-clean-python-shell-script[^]
 
Share this answer
 
Comments
CPallini 25-Aug-13 13:45pm    
5.
Python is not a shell. It is programming language. You can program many exploits using this programming language. So, the exploits that will spawn control over remote computers are also called as "SHELLS". Like this you can program exploits using perl, ruby, php like programming languages... Even if the exploits are called as "SHELLS", it is not original shell. In Linux the shells are "Bourne Shell(sh), Bash, C Shell(csh), K Shell(ksh), etc".

Also note it, python's commandline interpreter(open terminal/command prompt and run command "python", you can see python shell to run python commands/codes) is also known as "Python Shell".
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900