Ca foire dans les scripts d'impression, ce truc

darcs-hash:20051126132710-d1718-2a34c47dc864bcd75083c5dc638595e96ccb726e.gz
This commit is contained in:
bernat 2005-11-26 14:27:10 +01:00
parent 49836ba788
commit 75f2893753

View file

@ -10,8 +10,11 @@ Licence : GPLv2
import sys, sre, os, tempfile import sys, sre, os, tempfile
# Détermination de l'encodage # Détermination de l'encodage
try:
from locale import getpreferredencoding from locale import getpreferredencoding
encoding = getpreferredencoding() encoding = getpreferredencoding()
except:
encoding = "ISO-8859-15"
if 'TERM' in os.environ and os.environ['TERM'] != 'unknown': if 'TERM' in os.environ and os.environ['TERM'] != 'unknown':
el = os.popen('tput cr ; tput el').read() el = os.popen('tput cr ; tput el').read()