Utilisation de socket pour avoir l'IP.
darcs-hash:20050905144353-41617-ca561b4b56eab7e2a8dad4dd941a8a80ea967520.gz
This commit is contained in:
parent
b0fd40ca57
commit
6aa4174b8f
1 changed files with 3 additions and 3 deletions
|
@ -9,9 +9,9 @@
|
|||
|
||||
from commands import getoutput
|
||||
from time import sleep
|
||||
import os
|
||||
|
||||
IP = getoutput("host $(hostname)").split()[2]
|
||||
import os, socket
|
||||
|
||||
IP = socket.gethostbyaddr(socket.gethostname())[-1][0]
|
||||
|
||||
class CarteOqp(Exception) :
|
||||
""" La carte est déja utilisée """
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue