Faute de frappe et style
darcs-hash:20060928085835-9e428-9294decd1c277ddbdb3e51ad5582080899381d0b.gz
This commit is contained in:
parent
c080a8663a
commit
c8f902077c
1 changed files with 7 additions and 7 deletions
|
@ -2,24 +2,24 @@
|
|||
# -*- coding: iso-8859-15 -*-
|
||||
|
||||
import sys
|
||||
sys.path.append("/usr/script/gestion")
|
||||
sys.path.append("/usr/scripts/gestion")
|
||||
|
||||
import hptools
|
||||
|
||||
def etat():
|
||||
""" Renvoie une liste des differents ecrans actuels du display de l'imprimante """
|
||||
liste_oid=["mib-2.43.16.5.1.2.1.1","mib-2.43.16.5.1.2.1.2","mib-2.43.16.5.1.2.1.3","mib-2.43.16.5.1.2.1.4","mib-2.43.16.5.1.2.1.5"]
|
||||
liste_oid = ["mib-2.43.16.5.1.2.1.1","mib-2.43.16.5.1.2.1.2","mib-2.43.16.5.1.2.1.3","mib-2.43.16.5.1.2.1.4","mib-2.43.16.5.1.2.1.5"]
|
||||
try:
|
||||
comm=hptools.snmp(host="laserjet.adm.crans.org",version="1",community="public")
|
||||
liste_mssg=[]
|
||||
comm = hptools.snmp(host="laserjet.adm.crans.org",version="1",community="public")
|
||||
liste_mssg = []
|
||||
for oid in liste_oid:
|
||||
liste_mssg+=[comm.get_string(oid)]
|
||||
liste_mssg += [comm.get_string(oid)]
|
||||
except Exception,err:
|
||||
liste_mssg=[unicode(err)]*len(liste_oid)
|
||||
liste_mssg = [unicode(err)]*len(liste_oid)
|
||||
return liste_mssg
|
||||
|
||||
def enregistre(filename="/usr/script/impression/imprimante.etat"):
|
||||
l=etat()
|
||||
l = etat()
|
||||
fichier = open(filename,'w')
|
||||
for x in l:
|
||||
fichier.write(x+"\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue