{"action":"created","issue":{"url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/1813","labels_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/1813/labels{/name}","comments_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/1813/comments","events_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/1813/events","html_url":"https://github.com/syl20bnr/spacemacs/issues/1813","id":83969356,"number":1813,"title":"Having problems in the Python REPL","user":{"login":"geo7","id":8526351,"avatar_url":"https://avatars.githubusercontent.com/u/8526351?v=3","gravatar_id":"","url":"https://api.github.com/users/geo7","html_url":"https://github.com/geo7","followers_url":"https://api.github.com/users/geo7/followers","following_url":"https://api.github.com/users/geo7/following{/other_user}","gists_url":"https://api.github.com/users/geo7/gists{/gist_id}","starred_url":"https://api.github.com/users/geo7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geo7/subscriptions","organizations_url":"https://api.github.com/users/geo7/orgs","repos_url":"https://api.github.com/users/geo7/repos","events_url":"https://api.github.com/users/geo7/events{/privacy}","received_events_url":"https://api.github.com/users/geo7/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-02T10:58:00Z","updated_at":"2015-06-02T11:08:11Z","closed_at":null,"body":"This gives me an error within the REPL in emacs :\r\n\r\n```python\r\nlst = []\r\n>>> for d,s,f in os.walk('TESTER'):\r\n...     lst.append(s)\r\n  File \"<stdin>\", line 1\r\n    lst.append(s)\r\n    ^\r\nIndentationError: unexpected indent\r\n>>>\r\n```\r\n\r\nThis works fine in the terminal :\r\n\r\n```python\r\n>>> lst = []\r\n>>> for d,s,f in os.walk('TESTER'):\r\n...     lst.append(s)\r\n...\r\n>>>\r\n```\r\nDoesn't seem to be picking up some stuff as it's giving an indent error? \r\n\r\nos module imported on both examples"},"comment":{"url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/comments/107917206","html_url":"https://github.com/syl20bnr/spacemacs/issues/1813#issuecomment-107917206","issue_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/1813","id":107917206,"user":{"login":"tuhdo","id":4818719,"avatar_url":"https://avatars.githubusercontent.com/u/4818719?v=3","gravatar_id":"","url":"https://api.github.com/users/tuhdo","html_url":"https://github.com/tuhdo","followers_url":"https://api.github.com/users/tuhdo/followers","following_url":"https://api.github.com/users/tuhdo/following{/other_user}","gists_url":"https://api.github.com/users/tuhdo/gists{/gist_id}","starred_url":"https://api.github.com/users/tuhdo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuhdo/subscriptions","organizations_url":"https://api.github.com/users/tuhdo/orgs","repos_url":"https://api.github.com/users/tuhdo/repos","events_url":"https://api.github.com/users/tuhdo/events{/privacy}","received_events_url":"https://api.github.com/users/tuhdo/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T11:08:11Z","updated_at":"2015-06-02T11:08:11Z","body":"Currently, Emacs inserts spaces when you press `TAB`. You have to make Emacs actually inserts tab character in Python REPL. Add this to your `dotspacemacs/config` function:\r\n\r\n```elisp\r\n(add-hook 'inferior-python-mode-hook (lambda ()\r\n                                       (setq indent-tabs-mode t)))\r\n```\r\n\r\nYou can also write in a temporary Python buffer (created with `SPC b b`, if there's some candidate, switch to `Create Buffer` source at the bottom with `C-o`) then send to the Python REPL. You have many commands for sending i.e. send a function definition at point with `SPC s f`. "}}