First I want to say, that I use the print statement mainly for debugging and for "print func.__doc__" in the shell, but I would be very unhappy to see it go away. quasi patch for readline: Moshe Zadka wrote: > > Reference implementation: > > def writeln(*args, **kw): > import sys > file = sys.stdout > end = '\n' + joinstring = ' ' > if kw.has_key("file"): > file = kw['file'] > del kw['file'] + if kw.has_key("join"): + joinstring = kw['join'] + del kw['join'] > if kw.has_key("nl"): > if not kw['nl']: ! end = joinstring > del kw['nl'] ! file.write(joinstring.join(map(str, args))+end) Or this one <wink>: def writeln(*args, **kw): import sys file = sys.stdout end = '' if kw.has_key("file"): sys.stdout = kw['file'] del kw['file'] if kw.has_key("nl"): if not kw['nl']: end = ',' del kw['nl'] exec("print "+", ".join(map(repr,args))+end) having-slept-for-three-hours-ly y'rs Peter -- Peter Schneider-Kamp ++47-7388-7331 Herman Krags veg 51-11 mailto:peter@schneider-kamp.de N-7050 Trondheim http://schneider-kamp.de
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4