Heiko Wundram <modeln...@modelnine.org> writes: > Reading from stdin/a file gets you bytes, and > not a string, because Python cannot automagically guess what format the > input is in. > Huh?
Python 3.3.0rc1 (v3.3.0rc1:8bb5c7bc46ba, Aug 25 2012, 10:09:29) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> x = input() abcd123 >>> x 'abcd123' >>> type(x) <class 'str'> >>> y = sys.stdin.readline() abcd123 >>> y 'abcd123\n' >>> type(y) <class 'str'> -- Piet van Oostrum <p...@vanoostrum.org> WWW: http://pietvanoostrum.com/ PGP key: [8DAE142BE17999C4] -- http://mail.python.org/mailman/listinfo/python-list