Re: print as a function in 2.5 ?

2009-04-20 Thread Martin
Hi, On Sun, Apr 19, 2009 at 7:13 PM, Stef Mientki wrote: > hello, > > For several reasons I still use Python version 2.5. > I understand that the print-statement will be replaced in Python version > 3.0. > > At the moment I want to extend the print statement with an optional > traceback. > So I'v

Re: print as a function in 2.5 ?

2009-04-19 Thread Stef Mientki
Tino Wildenhain wrote: Stef Mientki wrote: hello, For several reasons I still use Python version 2.5. I understand that the print-statement will be replaced in Python version 3.0. At the moment I want to extend the print statement with an optional traceback. So I've 2 options: 1- make a ne

Re: print as a function in 2.5 ?

2009-04-19 Thread Tino Wildenhain
Stef Mientki wrote: hello, For several reasons I still use Python version 2.5. I understand that the print-statement will be replaced in Python version 3.0. At the moment I want to extend the print statement with an optional traceback. So I've 2 options: 1- make a new function, like "eprint

Re: print as a function in 2.5 ?

2009-04-19 Thread Pascal Chambon
Hello, I had found some article on this some months ago, can't remember where exactly... But if you don't want harassments, I'd just advise you to create a function with a properly specific name (like "exprint()"), and to make it mimic closely the signature and behaviour of Py3k's print() fu

Re: print as a function in 2.5 ?

2009-04-19 Thread Christian Heimes
Stef Mientki wrote: > Now doesn't seem to be allowed, > nor is there an import from __future__ :-( > > What's the best solution (other than moving to 2.6 or up ? The word 'print' is a reserved word like is, class or def. You can't have a function named 'print' in Python 2.5. You have to call you

print as a function in 2.5 ?

2009-04-19 Thread Stef Mientki
hello, For several reasons I still use Python version 2.5. I understand that the print-statement will be replaced in Python version 3.0. At the moment I want to extend the print statement with an optional traceback. So I've 2 options: 1- make a new function, like "eprint ()", where "e" stand