Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > fr.comp.lang.python > #3254

Re: fileinput

Newsgroups fr.comp.lang.python
Date 2019-10-27 01:04 -0700
References <713a01f1-05ac-4e7c-9153-afc6186ae7be@googlegroups.com> <qp0te8$igo$3@nemo.pasdenom.info> <4f94ad96-c050-4404-9522-f616c3e26a59@googlegroups.com> <qp3hlb$jfv$5@nemo.pasdenom.info>
Message-ID <c77b41a7-6b28-4bd6-8163-a443b3ab6cbd@googlegroups.com> (permalink)
Subject Re: fileinput
From lacsaP Patatetom <patatetom@gmail.com>

Show all headers | View raw


Le dimanche 27 octobre 2019 08:40:28 UTC+1, Jo Engo a écrit :
> Le Sat, 26 Oct 2019 08:15:34 -0700, lacsaP Patatetom a écrit :
> 
> > celui-ci fonctionne lorsque le fichier journal est passé en paramètre,
> > mais pas lorsqu'il passé sur l'entrée standard...
> 
> 
> Oui j'ai vu, mes excuse donc. Au risque de répondre encore à côté de la 
> plaque, 1 question et 1 suggestion qui n'a rien à voir avec la question
> 
> Question : où dans le fichier se situe le byte erroné ? (au milieu ou à 
> la fin ?) si c'est à la fin ça peut expliquer la différence de taritement
> 
> Suggestion
> 
> Comme tu semble attendre de tels problèmes pourquoi ne traites-tu pas le 
> fichier en raw (en 8 bits, sans tenir compte d'*aucun* caractères utf8)
> 
> -- 
> Le trop de promptitude à l'erreur nous expose.
> 	-+- Pierre Corneille -+-

il semblerait que le problème soit connu : https://bugs.python.org/issue26756
si sys.stdin est utilisé par fileinput alors le hook n'est pas appliqué, ce qui explique la différence de comportement...

Back to fr.comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

fileinput lacsaP Patatetom <patatetom@gmail.com> - 2019-10-25 13:04 -0700
  Re: fileinput Jo Engo <yl@icite.fr> - 2019-10-26 07:43 +0000
    Re: fileinput lacsaP Patatetom <patatetom@gmail.com> - 2019-10-26 08:15 -0700
      Re: fileinput Jo Engo <yl@icite.fr> - 2019-10-27 07:40 +0000
        Re: fileinput lacsaP Patatetom <patatetom@gmail.com> - 2019-10-27 01:04 -0700
          Re: fileinput lacsaP Patatetom <patatetom@gmail.com> - 2019-10-27 01:08 -0700
            Re: fileinput lacsaP Patatetom <patatetom@gmail.com> - 2019-10-27 01:16 -0700

csiph-web