{"action":"opened","issue":{"url":"https://api.github.com/repos/pazz/alot/issues/812","labels_url":"https://api.github.com/repos/pazz/alot/issues/812/labels{/name}","comments_url":"https://api.github.com/repos/pazz/alot/issues/812/comments","events_url":"https://api.github.com/repos/pazz/alot/issues/812/events","html_url":"https://github.com/pazz/alot/issues/812","id":122865575,"number":812,"title":"questions and troube with ce31ecf.","user":{"login":"lucc","id":1104419,"avatar_url":"https://avatars.githubusercontent.com/u/1104419?v=3","gravatar_id":"","url":"https://api.github.com/users/lucc","html_url":"https://github.com/lucc","followers_url":"https://api.github.com/users/lucc/followers","following_url":"https://api.github.com/users/lucc/following{/other_user}","gists_url":"https://api.github.com/users/lucc/gists{/gist_id}","starred_url":"https://api.github.com/users/lucc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucc/subscriptions","organizations_url":"https://api.github.com/users/lucc/orgs","repos_url":"https://api.github.com/users/lucc/repos","events_url":"https://api.github.com/users/lucc/events{/privacy}","received_events_url":"https://api.github.com/users/lucc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-18T02:25:41Z","updated_at":"2015-12-18T02:25:41Z","closed_at":null,"body":"If I understand ce31ecf correctly it is intended to make alot usable with the python -m switch and such. I get mixed results:\r\n```sh\r\ncd ~/vcs/alot\r\npython2 setup.py build\r\ncd build/lib\r\npython2 alot/__main__.py # works\r\npython2 alot             # works\r\npython2 -m alot          # fails\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/runpy.py\", line 162, in _run_module_as_main\r\n    \"__main__\", fname, loader, pkg_name)\r\n  File \"/usr/lib/python2.7/runpy.py\", line 72, in _run_code\r\n    exec code in run_globals\r\n  File \"/home/luc/vcs/alot/build/lib/alot/__main__.py\", line 12, in <module>\r\n    from alot.ui import UI\r\n  File \"alot/ui.py\", line 9, in <module>\r\n    from buffers import BufferlistBuffer\r\n  File \"alot/buffers.py\", line 20, in <module>\r\n    from alot.widgets.thread import ThreadTree\r\n  File \"alot/widgets/thread.py\", line 15, in <module>\r\n    from urwidtrees import Tree, SimpleTree, CollapsibleTree\r\nImportError: No module named urwidtrees\r\n```\r\n\r\nBut inside `__main__,py` the `if __name__ == '__main__':` check should not be needed. See https://docs.python.org/2/using/cmdline.html#interface-options (description of `<script>`)."}}