473,327 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Is any python like linux shell?

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
7 2220
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

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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Logan | last post by:
Several people asked me for the following HOWTO, so I decided to post it here (though it is still very 'alpha' and might contain many (?) mistakes; didn't test what I wrote, but wrote it - more or...
5
by: Ben Finney | last post by:
Howdy all, I'm experimenting with carrying my personal computing environment around on a keychain USB flash storage device. I have the usual suspects on there: SSH keys, GPG keys, program...
16
by: John Salerno | last post by:
Hi all. I just installed Ubuntu and I'm learning how to use the bash shell. Aside from the normal commands you can use, I was wondering if it's possible to use Python from the terminal instead of...
2
by: enquiring mind | last post by:
-learning python with limited knowledge of linux. -get error msg 21 "file or directory does not exist" -running Suse linux 10. -haven't had a problem before - rebooted several times. -python...
3
by: wxPythoner | last post by:
This really looks ugly for an error message: + Stopped python Please explain to me the role of the '+' sign. And why is there such a gap between 'Stopped' and 'python'?
3
by: Gros Bedo | last post by:
Hello :-) I have a question about Python and Linux shell. I have a python program which is permanently resident in the end-user system. I'm currently producing a RPM package, and it works nicely....
4
by: Stephen Cattaneo | last post by:
Hello all, I am attempting to execute an automated test (written in Python) via cron. I have to check the HOSTNAME variable as part of the test, oddly under cron the HOSTNAME environment...
3
by: mmm | last post by:
I am looking for advice on Python Editors and IDEs I have read other posts and threads on the subject and my two questions at this time are mainly about the IDLE-like F5-run facilities. While I...
8
by: james.kirin39 | last post by:
Hi everyone, After having used Python on Linux for some time, I now have to do Python coding on Windows. I am big fan of the interactive Python shell to test, eg, regexps. Is there an...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.