Gnarlodious wrote:
On Dec 1, 8:36 am, Lie Ryan wrote:
#!/usr/bin/python
import sys
print = lambda s: sys.stdout.buffer.write(s.encode('utf-8'))
This is almost exactly the same as
def print(s): return sys.stdout.buffer.write(s.encode('utf-8'))
except that the latter gives better error tracebacks.
print("Content-type:text/plain;charset=utf-8\n\n")
print('晉\n')
HA! IT WORKS! Thank you thank you thank you. I don't understand the
lambda functionality but will figure it out.
Nothing to do with lambda, really. See above.
tjr
--
http://mail.python.org/mailman/listinfo/python-list