I am working with the ESP8266 and Micropython currently and I encountered a strange behaviour.
example string:
Server: SimpleHTTP/0.6 Python/2.7.13\r\nDate: Wed, 02 Aug 2017 13:40:05 GMT\r\nContent-type: application/octet-stream\r\nContent-Length: 6609\r\nLast-Modified: Wed, 02 Aug 2017 13:02:40 GMT\r\n\r\n<Storage {}>86400<div>Uhrzeit in Sekunden: 65567</div><div>Timer: 20833</div>\r\n<!DOCTYPE html>\r\n<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js" lang="de"> <!--<![endif]-->\r\n <head>\r\n <meta charset="utf-8">\r\n <!\xe2\x80\x94 www.phpied.com/conditional-comments-block-downloads/ \xe2\x80\x94>\r\n <!\xe2\x80\x94 Always force latest IE rendering engine\r\n
when i paste it into the putty console it is fine. When i save it in a variable like that:
a = 'paste examplestring and add the second ' afterwards it is fine.
but when i type a = '' and paste the string in afterwards it turns into that:
a = 'Server: SimpleHTTP/0.6 Python/2.7.13\r\nDate: Wed, 02 Aug 2017 13:40:05 GMT\r\nContent-type: application/octet-stream\r\nContent-Length: 6609\r\nLast-Modified: Wed, 02 Aug 2017 13:02:40 GMT\r\n\r\n<Storage {}>86400<div>Uhrzeit in Sekunden: 65567</div><div>Timer: 20833</div>\r\n<!DOCTYPE html>\r\n<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js" lang="de"> <!--<![endif]-->\r\n <head>\r\n <meta charset="utf-8">\r\n <!\xe2\x80w.phpditions-blos/ \x\r\n 80\x9rce lnderin\'
I really dont know why this happens. Is it something that has to do with Putty? Because when I use the python interpreter directly on my local machine it works as supposed without this weird behaviour.