{"action":"opened","issue":{"url":"https://api.github.com/repos/bbatsov/prelude/issues/1029","repository_url":"https://api.github.com/repos/bbatsov/prelude","labels_url":"https://api.github.com/repos/bbatsov/prelude/issues/1029/labels{/name}","comments_url":"https://api.github.com/repos/bbatsov/prelude/issues/1029/comments","events_url":"https://api.github.com/repos/bbatsov/prelude/issues/1029/events","html_url":"https://github.com/bbatsov/prelude/issues/1029","id":174187726,"number":1029,"title":"Add add-breakpoint function to python module","user":{"login":"k1-hedayati","id":5066672,"avatar_url":"https://avatars.githubusercontent.com/u/5066672?v=3","gravatar_id":"","url":"https://api.github.com/users/k1-hedayati","html_url":"https://github.com/k1-hedayati","followers_url":"https://api.github.com/users/k1-hedayati/followers","following_url":"https://api.github.com/users/k1-hedayati/following{/other_user}","gists_url":"https://api.github.com/users/k1-hedayati/gists{/gist_id}","starred_url":"https://api.github.com/users/k1-hedayati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k1-hedayati/subscriptions","organizations_url":"https://api.github.com/users/k1-hedayati/orgs","repos_url":"https://api.github.com/users/k1-hedayati/repos","events_url":"https://api.github.com/users/k1-hedayati/events{/privacy}","received_events_url":"https://api.github.com/users/k1-hedayati/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-31T05:30:12Z","updated_at":"2016-08-31T05:30:12Z","closed_at":null,"body":"I found this two functions useful, adding them to prelude would be nice\r\n```elisp\r\n;; http://wenshanren.org/?p=351\r\n(defun python-add-breakpoint ()\r\n  \"Add a break point\"\r\n  (interactive)\r\n  (newline-and-indent)\r\n  (insert \"import ipdb; ipdb.set_trace()\")\r\n  (highlight-lines-matching-regexp \"^[ ]*import ipdb; ipdb.set_trace()\"))\r\n(global-set-key (kbd \"C-c C-b\") 'python-add-breakpoint)\r\n\r\n(defun python-interactive ()\r\n  \"Enter the interactive Python environment\"\r\n  (interactive)\r\n  (progn\r\n    (newline-and-indent)\r\n    (insert \"from IPython import embed; embed()\") ;; or (insert \"!import code; code.interact(local=vars())\")\r\n    (move-end-of-line 1)))\r\n(global-set-key (kbd \"C-c C-n\") 'python-interactive)\r\n```"}}
{"actor":{"display_login":"k1-hedayati"}}