{"action":"created","issue":{"url":"https://api.github.com/repos/TomCrypto/lanius/issues/2","labels_url":"https://api.github.com/repos/TomCrypto/lanius/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/TomCrypto/lanius/issues/2/comments","events_url":"https://api.github.com/repos/TomCrypto/lanius/issues/2/events","html_url":"https://github.com/TomCrypto/lanius/pull/2","id":103915968,"number":2,"title":"Fix some Unicode issues with Python 2/3 by using six. Ignore Vim undo files","user":{"login":"prologic","id":1290234,"avatar_url":"https://avatars.githubusercontent.com/u/1290234?v=3","gravatar_id":"","url":"https://api.github.com/users/prologic","html_url":"https://github.com/prologic","followers_url":"https://api.github.com/users/prologic/followers","following_url":"https://api.github.com/users/prologic/following{/other_user}","gists_url":"https://api.github.com/users/prologic/gists{/gist_id}","starred_url":"https://api.github.com/users/prologic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prologic/subscriptions","organizations_url":"https://api.github.com/users/prologic/orgs","repos_url":"https://api.github.com/users/prologic/repos","events_url":"https://api.github.com/users/prologic/events{/privacy}","received_events_url":"https://api.github.com/users/prologic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-30T10:02:39Z","updated_at":"2015-08-30T11:12:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/TomCrypto/lanius/pulls/2","html_url":"https://github.com/TomCrypto/lanius/pull/2","diff_url":"https://github.com/TomCrypto/lanius/pull/2.diff","patch_url":"https://github.com/TomCrypto/lanius/pull/2.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/TomCrypto/lanius/issues/comments/136129141","html_url":"https://github.com/TomCrypto/lanius/pull/2#issuecomment-136129141","issue_url":"https://api.github.com/repos/TomCrypto/lanius/issues/2","id":136129141,"user":{"login":"TomCrypto","id":1861870,"avatar_url":"https://avatars.githubusercontent.com/u/1861870?v=3","gravatar_id":"","url":"https://api.github.com/users/TomCrypto","html_url":"https://github.com/TomCrypto","followers_url":"https://api.github.com/users/TomCrypto/followers","following_url":"https://api.github.com/users/TomCrypto/following{/other_user}","gists_url":"https://api.github.com/users/TomCrypto/gists{/gist_id}","starred_url":"https://api.github.com/users/TomCrypto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomCrypto/subscriptions","organizations_url":"https://api.github.com/users/TomCrypto/orgs","repos_url":"https://api.github.com/users/TomCrypto/repos","events_url":"https://api.github.com/users/TomCrypto/events{/privacy}","received_events_url":"https://api.github.com/users/TomCrypto/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T11:12:35Z","updated_at":"2015-08-30T11:12:35Z","body":"Thanks a bunch, it works much better with Python 2 now! It's still not working properly with input files that contain non-ascii characters however, like [this random github readme](https://raw.githubusercontent.com/unitedstates/congress-legislators/master/README.md), it would throw an unicode decoding exception inside python-markdown. I was able to get it to work using:\r\n\r\n```python\r\nf = fileinput.input(files=args.file, mode='rb')\r\ntext = ''.join([line.decode('utf-8') for line in f])\r\nstream = markdown.markdown(text, exts)\r\nf.close()\r\n```\r\n\r\ni.e. bypassing fileinput's encoding completely and just decoding the whole damn file into an utf-8 string myself. Miraculously this works in both Py2 and Py3, so I'm pretty okay with it. The other thing was the literal unicode symbols in `themes.py` were getting garbled when printed to the terminal, had to convert them to e.g. `\\u2022` and such, and making all the strings in there unicode as well. After that it seemed to work properly all the time.\r\n\r\nWhat do you think? It looks pretty clean other than the final print with the python version check which is a bit icky, but other than that..."}}