{"action":"created","issue":{"url":"https://api.github.com/repos/ywangd/stash/issues/108","labels_url":"https://api.github.com/repos/ywangd/stash/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/ywangd/stash/issues/108/comments","events_url":"https://api.github.com/repos/ywangd/stash/issues/108/events","html_url":"https://github.com/ywangd/stash/issues/108","id":57739571,"number":108,"title":"CC (Control-C) confuses `raw_input`","user":{"login":"oefe","id":2773028,"avatar_url":"https://avatars.githubusercontent.com/u/2773028?v=3","gravatar_id":"","url":"https://api.github.com/users/oefe","html_url":"https://github.com/oefe","followers_url":"https://api.github.com/users/oefe/followers","following_url":"https://api.github.com/users/oefe/following{/other_user}","gists_url":"https://api.github.com/users/oefe/gists{/gist_id}","starred_url":"https://api.github.com/users/oefe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oefe/subscriptions","organizations_url":"https://api.github.com/users/oefe/orgs","repos_url":"https://api.github.com/users/oefe/repos","events_url":"https://api.github.com/users/oefe/events{/privacy}","received_events_url":"https://api.github.com/users/oefe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-15T18:14:21Z","updated_at":"2015-02-16T10:46:00Z","closed_at":null,"body":"Pressing the `CC` button during `raw_input` in a command terminates the command as expected. However, afterwards `raw_input` calls in future runs of the command get mixed up.\r\n\r\n## Test command ##\r\n\r\n```python \r\nfirst = raw_input('first: ')\r\nprint ('first = {}'.format(first))\r\nsecond = raw_input('second: ')\r\nprint ('second = {}'.format(second))\r\nthird = raw_input('third: ')\r\nprint ('third = {}'.format(third))\r\n```\r\n\r\n## Example runs ##\r\n```\r\n~/Documents]$ test_raw.py \r\nfirst: alpha\r\nfirst = alpha\r\nsecond: beta\r\nsecond = beta\r\nthird: gamma\r\nthird = gamma\r\n[~/Documents]$ test_raw.py\r\nfirst: aleph\r\nfirst = aleph\r\nsecond: stash: successfully terminated thread <Thread(_shruntime_thread, stopped daemon 324108288)>\r\n[~/Documents]$ test_raw.py\r\nfirst: Alice\r\nsecond = Alice\r\nthird: Bob\r\nthird = Bob\r\n[~/Documents]$ \r\n```\r\n\r\nThe first (uninterrupted) run works as expected.\r\nAlso, the second run (interrupted at the second prompt) seems to terminate fine.\r\nHowever, the third run (uninterrupted again) behaves strange:\r\n- where is the output of the first `print` gone?\r\n- also, where is the second prompt?\r\n- and why does the second `print` print what I entered at the first prompt?\r\n\r\nThis is in the `dev` branch, btw."},"comment":{"url":"https://api.github.com/repos/ywangd/stash/issues/comments/74489621","html_url":"https://github.com/ywangd/stash/issues/108#issuecomment-74489621","issue_url":"https://api.github.com/repos/ywangd/stash/issues/108","id":74489621,"user":{"login":"jsbain","id":7924558,"avatar_url":"https://avatars.githubusercontent.com/u/7924558?v=3","gravatar_id":"","url":"https://api.github.com/users/jsbain","html_url":"https://github.com/jsbain","followers_url":"https://api.github.com/users/jsbain/followers","following_url":"https://api.github.com/users/jsbain/following{/other_user}","gists_url":"https://api.github.com/users/jsbain/gists{/gist_id}","starred_url":"https://api.github.com/users/jsbain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsbain/subscriptions","organizations_url":"https://api.github.com/users/jsbain/orgs","repos_url":"https://api.github.com/users/jsbain/repos","events_url":"https://api.github.com/users/jsbain/events{/privacy}","received_events_url":"https://api.github.com/users/jsbain/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T10:46:00Z","updated_at":"2015-02-16T10:46:00Z","body":"Wonderful!  I tried it, and worked great.\r\nOne question... DId cat always require two ctrlDs to end input mode?  Not sure if that behavior broke here, or if it was always that way?"}}