By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,558 Members | 1,399 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,558 IT Pros & Developers. It's quick & easy.

Is any python like linux shell?

P: n/a
I learned some python in windows.
And now I've turned to linux.
I read a book and it teaches how to write shell script with bash,
but I don't feel like the grammar of bash.
Since I know about python,
I want to get a linux shell which use python grammar.
I searched by google and I found pysh, which is not maintained any
more.
There's another script named pyshell, which is not likely what I'm
searching for.
So, will somebody please tell me if there are any python like shells
for linux?

Jan 21 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Frank Potter wrote:
I learned some python in windows.
And now I've turned to linux.
I read a book and it teaches how to write shell script with bash,
but I don't feel like the grammar of bash.
Since I know about python,
I want to get a linux shell which use python grammar.
I searched by google and I found pysh, which is not maintained any
more.
There's another script named pyshell, which is not likely what I'm
searching for.
So, will somebody please tell me if there are any python like shells
for linux?
IPython is actually more than a simple shell. Give it a try:
http://ipython.scipy.org/.

George

Jan 21 '07 #2

P: n/a

George Sakkis wrote:
Frank Potter wrote:
I learned some python in windows.
And now I've turned to linux.
I read a book and it teaches how to write shell script with bash,
but I don't feel like the grammar of bash.
Since I know about python,
I want to get a linux shell which use python grammar.
I searched by google and I found pysh, which is not maintained any
more.
There's another script named pyshell, which is not likely what I'm
searching for.
So, will somebody please tell me if there are any python like shells
for linux?

IPython is actually more than a simple shell. Give it a try:
http://ipython.scipy.org/.

George
Frank,
IPython is great, but it is not a replacement for a shell like bash. If
you have a Linux system then you still need to know the rudiments of
bash

- Paddy.

Jan 22 '07 #3

P: n/a
Paddy wrote:
George Sakkis wrote:

>>Frank Potter wrote:

>>>I learned some python in windows.
And now I've turned to linux.
I read a book and it teaches how to write shell script with bash,
but I don't feel like the grammar of bash.
Since I know about python,
I want to get a linux shell which use python grammar.
I searched by google and I found pysh, which is not maintained any
more.
There's another script named pyshell, which is not likely what I'm
searching for.
So, will somebody please tell me if there are any python like shells
for linux?

IPython is actually more than a simple shell. Give it a try:
http://ipython.scipy.org/.

George


Frank,
IPython is great, but it is not a replacement for a shell like bash. If
you have a Linux system then you still need to know the rudiments of
bash
Or better yet, csh. ;)

James

Jan 22 '07 #4

P: n/a
Frank Potter wrote:
I learned some python in windows.
And now I've turned to linux.
I read a book and it teaches how to write shell script with bash,
but I don't feel like the grammar of bash.
Since I know about python,
I want to get a linux shell which use python grammar.
I searched by google and I found pysh, which is not maintained any
more.
There's another script named pyshell, which is not likely what I'm
searching for.
So, will somebody please tell me if there are any python like shells
for linux?
Best is to do simple things (ls, mv, rm, cp) via bash or tcsh and to use
python for things of any greater complexity (even slightly more complex).

My strongest advice would be to let go of the idea of "shell scripting"
altogether and begin to write programs built from libraries to solve
your problems. The mere act of beginning to write a shell script (in,
say, bash) will tie you to that "language", even when you realize your
task was much more complex than you had originally imagined. It has
happened to me time and time again.

James
Jan 22 '07 #5

P: n/a
Frank Potter wrote:
I learned some python in windows.
And now I've turned to linux.
I read a book and it teaches how to write shell script with bash,
but I don't feel like the grammar of bash.
Since I know about python,
I want to get a linux shell which use python grammar.
I searched by google and I found pysh, which is not maintained any
more.
There's another script named pyshell, which is not likely what I'm
searching for.
So, will somebody please tell me if there are any python like shells
for linux?
You could in principle use Python as a general-purpose interactive
shell, but it wouldn't make much sense. Bash is more convenient for
basic operations such as changing directories, listing directories,
copying files, etc.

For more advanced scripting, I use both bash and Python. I use bash
typically as an executive for scripting Python programs. For example, I
use bash for stepping through a list of directories and running a set
of python programs in each directory. Sure, I could use Python for the
whole thing, but simply starting programs and moving files around is
more straightforward in bash than in Python.

Jan 22 '07 #6

P: n/a
In article <ep**********@daisy.noc.ucla.edu>,
James Stroud <js*****@mbi.ucla.eduwrote:
....
Paddy wrote:'
Frank,
IPython is great, but it is not a replacement for a shell like bash. If
you have a Linux system then you still need to know the rudiments of
bash

Or better yet, csh. ;)
Careful, someone will think you're serious.
Jan 22 '07 #7

P: n/a
On Sun, 21 Jan 2007 22:10:17 -0800, James Stroud <js*****@mbi.ucla.eduwrote:
Frank Potter wrote:
>I learned some python in windows.
And now I've turned to linux.
I read a book and it teaches how to write shell script with bash,
but I don't feel like the grammar of bash.
....
My strongest advice would be to let go of the idea of "shell scripting"
altogether and begin to write programs built from libraries to solve
your problems.
Shell scripting is "building from libraries". In this case, other
executables are the libraries.
The mere act of beginning to write a shell script (in,
say, bash) will tie you to that "language",
In what way is shell scripting different from Python scripting here?
even when you realize your
task was much more complex than you had originally imagined. It has
happened to me time and time again.
Opinions differ, of course.

Me, I don't hesitate to write Bourne shell scripts when that seems like the
straightforward idea. Then it's my responsibility to move to something else
-- usually Python -- if the problem grows out of its language. (And I have
to admit, I don't let it grow very complex before I make that choice,
because I don't known Bourne shell that well.)

/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.dyndns.org R'lyeh wgah'nagl fhtagn!
Jan 22 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.