Get the hostname

Discussion in 'Python' started by Lukas Schnieper, Aug 6, 2003.

  1. Hi
    How can i get the hostname of my Linux PC?
    I tried os.system('hostname') but i cant save the hostname in a variable
    like hostname = os.system('hostname')

    thanks
    Lukas Schnieper
     
    Lukas Schnieper, Aug 6, 2003
    #1
    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. AWieminer
    Replies:
    0
    Views:
    776
    AWieminer
    Jul 12, 2005
  2. vi
    Replies:
    5
    Views:
    16,913
    Roedy Green
    Sep 19, 2005
  3. Replies:
    8
    Views:
    14,652
  4. Golawala, Moiz M \(GE Infrastructure\)

    How to get Hostname using SimpleXMLRPCServer

    Golawala, Moiz M \(GE Infrastructure\), May 6, 2004, in forum: Python
    Replies:
    0
    Views:
    319
    Golawala, Moiz M \(GE Infrastructure\)
    May 6, 2004
  5. Golawala, Moiz M \(GE Infrastructure\)

    RE: How to get Hostname using SimpleXMLRPCServer

    Golawala, Moiz M \(GE Infrastructure\), May 6, 2004, in forum: Python
    Replies:
    1
    Views:
    611
    Roger Binns
    May 7, 2004
Loading...

Share This Page