473,473 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Interact with system command prompt

Hi all. I would like to know if there's some python framework able to
interact with system command prompt (cmd.exe or /bin/sh, depending on
the system) from python.
I need something that supports key/path auto completion by pressing TAB
button and the possibility to use interactive programs like ftp, gpg or
even vi.
I would like to write a remote shell application the best featured as
possible and I'm wondering if Python is able to emulate the
functionalities of applications like telnet or ssh.

Thanks in advance for your helping.

Sep 18 '06 #1
5 2911
billie wrote:
Hi all. I would like to know if there's some python framework able to
interact with system command prompt (cmd.exe or /bin/sh, depending on
the system) from python.
I need something that supports key/path auto completion by pressing TAB
button and the possibility to use interactive programs like ftp, gpg or
even vi.
I would like to write a remote shell application the best featured as
possible and I'm wondering if Python is able to emulate the
functionalities of applications like telnet or ssh.
Check out IPython.

http://ipython.scipy.org/
Diez
Sep 18 '06 #2

Diez B. Roggisch ha scritto:
billie wrote:
Hi all. I would like to know if there's some python framework able to
interact with system command prompt (cmd.exe or /bin/sh, depending on
the system) from python.
I need something that supports key/path auto completion by pressing TAB
button and the possibility to use interactive programs like ftp, gpg or
even vi.
I would like to write a remote shell application the best featured as
possible and I'm wondering if Python is able to emulate the
functionalities of applications like telnet or ssh.

Check out IPython.

http://ipython.scipy.org/
Diez
Thank you. It seems to me a powerful tool. I'll try to play with it.

Sep 18 '06 #3
Uhm... It seems that IPython got some problems:
http://ipython.scipy.org/doc/manual/node12.html

In details:
>Note that this does not make IPython a full-fledged system shell. In particular, it has >no job control, so if you type Ctrl-Z (under Unix), you'll suspend pysh itself, not the >process you just started.
>What the shell profile allows you to do is to use the convenient and powerful syntax of >Python to do quick scripting at the command line.
Sep 18 '06 #4
billie wrote:
Uhm... It seems that IPython got some problems:
http://ipython.scipy.org/doc/manual/node12.html

In details:
>>Note that this does not make IPython a full-fledged system shell. In
particular, it has >no job control, so if you type Ctrl-Z (under Unix),
you'll suspend pysh itself, not the >process you just started.
>>What the shell profile allows you to do is to use the convenient and
powerful syntax of >Python to do quick scripting at the command line.

Might be. But it could provide some insight into how to solve your problem.

Diez
Sep 18 '06 #5
billie wrote:
Uhm... It seems that IPython got some problems:
http://ipython.scipy.org/doc/manual/node12.html

In details:
>>Note that this does not make IPython a full-fledged system shell. In
particular, it has >no job control, so if you type Ctrl-Z (under Unix),
you'll suspend pysh itself, not the >process you just started.
>>What the shell profile allows you to do is to use the convenient and
powerful syntax of >Python to do quick scripting at the command line.
Note that these are simply limitations of what has been done out of
developer interest, not fundamental ones of design. I'm not in the
business of writing system shells, so I (nor anyone else) never implemented
full-fledged job control.

If you do it and send it in, we'll be happy to include it. And I suspect
IPython does a LOT of stuff already that you'll spend a fair amount of time
rewriting from scratch, so perhaps helping in to fill in the missing pieces
might be a good investment of your time.

Cheers,

f (ipython lead developer)

Sep 21 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Birch | last post by:
I have a python script that uses the print function throughout, and as well uses calls to os.system() to spawn DOS commandline executables. My issue is that I redirect all of the output from this...
2
by: Enno Middelberg | last post by:
Hi all, I am using mpeg_encode under Linux to generate little movies. The parameter file is generated by a Python script, the last line of which is os.system('mpeg_encode mpeg.par') When I...
12
by: Jamie Ruff | last post by:
I am having problems with making system calls on Windows under Cygwin that involve the use of redirection operators and pipes. For example, the line below will cat two files, but the next command...
14
by: jas | last post by:
I would like to redirect the output from os.system to a variable, but am having trouble. I tried using os.popen(..).read() ...but that doesn't give me exactly what i want. ...this is windows by...
1
by: Michael Goerz | last post by:
Hi, when my program uses system(), system("latex temp.tex") in this case, to execute some DOS-command on Windows, I always have the prompt popping up in front while the command is running. How...
9
by: Tommy Lu | last post by:
Hi, wondering if there is a way to interact the shell command with the C# program? For example, if I type c:\>ver it then suppose to return the version of the OS I am currently using... or ...
0
by: wayne hamilton | last post by:
I'm having a problem Interacting with Command Line programs. I can read and write anything I want as long as I don't have to interact with a process once it's started. Originally I had been calling...
1
by: rtilley | last post by:
I've written a script that automatically executes a set of Windows installers sequentially. For example, it will install Eudora, Firefox, SpyBot, etc. However, I still have to interact with the...
8
by: svata | last post by:
Hello, as I'm new to python I've stumbled accros os.system and its not very well documented usage. I use Win XP Pro and Python 2.5. Here is the code snippet: ...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.