Il peut y avoir un '/' sans que ce soit le nom d'un fichier ...
darcs-hash:20050629223025-061a7-cec717a33807e3238d7d0943a06d3731ac637ddd.gz
This commit is contained in:
parent
a2bc55607a
commit
cc55d751ad
1 changed files with 6 additions and 2 deletions
|
@ -31,8 +31,12 @@ def preliminaires(arguments, description):
|
|||
sys.exit(0) # On n'arrete pas l'imprimante
|
||||
|
||||
if arguments[-1].find('/') != -1 :
|
||||
# Fichier fourni
|
||||
entree = open(arguments[-1])
|
||||
try:
|
||||
# Fichier fourni
|
||||
entree = open(arguments[-1])
|
||||
except:
|
||||
# Des fois les options contiennent un / ...
|
||||
entree = sys.stdin
|
||||
else :
|
||||
# Lecture sur entree standard
|
||||
entree = sys.stdin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue