473,386 Members | 1,647 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,386 software developers and data experts.

Python: executing ping and whois

Hi all,

Anybody that could tell me how to execute some Linux commands using
Python.
The application is that I want to be able from a website to launch a
Python script and that python script should be able to ping to the
provided IP address, or should do a whois of that IP address. I want
to use the existing Linux commands if possible.

Anyone has an idea or tutorial?

Thanks,
Jul 18 '05 #1
3 9557
WIWA wrote:
I want
to use the existing Linux commands if possible.


Checkout os.system or (better) os.popen* functions

--
Lawrence "Rhymes" Oluyede
http://loluyede.blogspot.com
rh****@NOSPAMmyself.com
Jul 18 '05 #2
wi*********@skynet.be (WIWA) writes:
Anybody that could tell me how to execute some Linux commands using
Python.

[...]

os.system, os.popen*, popen2 module. Also

http://pexpect.sourceforge.net/
John
Jul 18 '05 #3
On 20 Aug 2003 14:03:18 -0700, WIWA <wi*********@skynet.be> wrote:
Anybody that could tell me how to execute some Linux commands using
Python.
The application is that I want to be able from a website to launch a
Python script and that python script should be able to ping to the
provided IP address, or should do a whois of that IP address. I want
to use the existing Linux commands if possible.

Anyone has an idea or tutorial?


http://python.org/doc/current/lib/module-commands.html

Should be just what you want.

J.
Jul 18 '05 #4

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

Similar topics

0
by: richard.hubbell | last post by:
I am sure this is old news, the syntax of python is crazy to me. There I said it, I'm sure I'll get over it or around it. I was trying to make a whois script work and was unable. May be...
24
by: Rudolf | last post by:
Is there a way to do a plain ping operation in VB.Net using only .Net libraries? Thanks Rudolf
3
by: Vjay77 | last post by:
As a result from who is I am getting this: > > NOTICE AND TERMS OF USE: You are not authorized to access or query our WHOIS database through the use of high-volume, automated, electronic...
0
by: skip | last post by:
I'm looking to get whois information for a given domain from Python. I'm mostly interested in record update and creation dates at the moment, but eventually might want more. I stumbled upon a...
10
by: Roel | last post by:
Hi all, I want to query WHOIS info from my ASP.NET app. I'd like to query a specific domain (e.g. google.com) and for availability (e.g. google.eu (available/taken), google.nl...
8
by: Thomas Dybdahl Ahle | last post by:
Hi, I've writing a python application in which I'd like to have a small "ping label", to always tell the current ping time to the server. It seems however that I have to be root to send those...
0
by: eliss | last post by:
Hi everyone, I'm trying to write a python script to whois a few domains twice a day so I get notified when they become available. I did it 2 ways, but neither way is very reliable, so I'm asking...
3
by: Phillip B Oldham | last post by:
Hi. I'm stretching my boundaries in programming with a little python shell-script which is going to loop through a list of domain names, grab the whois record, parse it, and put the results into a...
3
by: James Mills | last post by:
On Thu, Oct 9, 2008 at 2:26 PM, Warren DeLano <warren@delsci.comwrote: Yes it does :) I second this. It's far better to use Data Structures rather than Programming Constructs
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.