Recuperation des ips.
darcs-hash:20071220231137-af139-2453c8df5dc851d0f763b54551a958ae581e62cd.gz
This commit is contained in:
parent
bc497640a9
commit
ec6b3c8c23
1 changed files with 17 additions and 0 deletions
17
etc/python/ip.py
Normal file
17
etc/python/ip.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
# -*- mode: python; coding: utf-8 -*-
|
||||
#
|
||||
# Recuperation des addresses ip des serveurs
|
||||
|
||||
import socket
|
||||
|
||||
def pubipof(hostname):
|
||||
socket.gethostbyname(hostname + ".crans.org")
|
||||
|
||||
def admipof(hostname):
|
||||
socket.gethostbyname(hostname + ".adm.crans.org")
|
||||
|
||||
def pubip():
|
||||
pubip(pubhostname)
|
||||
|
||||
def admip():
|
||||
admip(admhostname)
|
Loading…
Add table
Add a link
Reference in a new issue