New submission from Jānis <janis.judvai...@gmail.com>: test = "Hi there :)" print len(test), test // Prints "11 Hi there :)" test = test.replace(" ", "\x00") print len(test), test // Prints "11
On Windows '\x00' is same as ' ', but on linux string is terminated at first occurance of '\x00'. Results on problems with pySerial and binary data, so I can't replace '\x00' with ' '. ---------- components: Interpreter Core messages: 162413 nosy: jjanis priority: normal severity: normal status: open title: Sting termination on Linux type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15019> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com