On Oct 14, 5:01 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> I have found myself writing functions rather like these:
>
> def openfile(filename):
> if filename == '-':
> # convention for shell scripts in Unix-land is to use
> # '-' for stdin/stdout for rea
Steven D'Aprano wrote:
> I have found myself writing functions rather like these:
>
> def openfile(filename):
> if filename == '-':
> # convention for shell scripts in Unix-land is to use
> # '-' for stdin/stdout for reading/writing.
> outfile = sys.stdout
> if file
I have found myself writing functions rather like these:
def openfile(filename):
if filename == '-':
# convention for shell scripts in Unix-land is to use
# '-' for stdin/stdout for reading/writing.
outfile = sys.stdout
if filename == '2-':
outfile = sys.std