Python: executing ping and whois

Discussion in 'Python' started by WIWA, Aug 20, 2003.

  1. WIWA

    WIWA Guest

    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,
    WIWA, Aug 20, 2003
    #1
    1. Advertising

  2. 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
    Lawrence Oluyede, Aug 20, 2003
    #2
    1. Advertising

  3. WIWA

    John J. Lee Guest

    (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
    John J. Lee, Aug 20, 2003
    #3
  4. On 20 Aug 2003 14:03:18 -0700, WIWA <> 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.
    Jordan Krushen, Aug 21, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Batista, Facundo

    RE: Python: executing ping and whois

    Batista, Facundo, Aug 20, 2003, in forum: Python
    Replies:
    0
    Views:
    494
    Batista, Facundo
    Aug 20, 2003
  2. whois info from Python?

    , May 5, 2006, in forum: Python
    Replies:
    0
    Views:
    1,670
  3. whois python interface

    , Mar 10, 2007, in forum: Python
    Replies:
    0
    Views:
    1,193
  4. eliss

    reliable whois in python

    eliss, Jan 15, 2008, in forum: Python
    Replies:
    0
    Views:
    351
    eliss
    Jan 15, 2008
  5. Phillip B Oldham
    Replies:
    3
    Views:
    525
    Phillip B Oldham
    Jun 11, 2008
Loading...

Share This Page