From: Pierre Ossman Date: Thu, 22 Sep 2005 15:06:40 GMT Subject: Re: StGIT cannot import properly from stdin Message-ID: <4332C880.1060906@drzeus.cx> In-Reply-To: Catalin Marinas wrote: >It looks like a problem with Python since it re-opens sys.stdin once >it receives EOF. > > > Bummer. I checked with the local Python guru here and he suggested changing the for loop to an infinite while and f.readline(). >I was referring to the 'cache the input to memory' variant, which is a >bit more complicated. Caching to a file is simple but do you need to >read patches from the terminal directly? > > > I don't explicitly need it, but it keeps things simple for me. I can copy and paste the patch from my mailer without having to bother with saving it to a temporary file.