[Mailman-Developers] print >> sys.stderr does not compile
Fil
fil@rezo.net
Tue, 20 Feb 2001 11:47:50 +0100
> > You recently changed all calls like
> > write('(locked)', file=sys.stderr)
> > to
> > print >> sys.stderr, _('(locked)')
> >
> > but the latter will not compile on my machine. Am I missing something?
>
> I'd guess that your version of Python isn't recent enough to have the
> new `>>' for I/O redirection.
>
> Sorry, but I don't know what version you'd require.
Indeed it seems that python 1.52 does not accept the new calls. The error is
not here with python2.
miel:~/mailman# python2
Python 2.0 (#0, Jan 11 2001, 10:52:15)
[GCC 2.95.2 20000220 (Debian GNU/Linux)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> print >> sys.stderr, "toto"
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: There is no variable named 'sys'
>>>
miel:~/mailman# python
Python 1.5.2 (#0, Dec 27 2000, 14:53:01) [GCC 2.95.2 20000220 (Debian
GNU/Linux)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> print >> sys.stderr, "toto"
File "<stdin>", line 1
print >> sys.stderr, "toto"
^
SyntaxError: invalid syntax
-- Fil