{"action":"created","issue":{"url":"https://api.github.com/repos/nest/nest-simulator/issues/377","repository_url":"https://api.github.com/repos/nest/nest-simulator","labels_url":"https://api.github.com/repos/nest/nest-simulator/issues/377/labels{/name}","comments_url":"https://api.github.com/repos/nest/nest-simulator/issues/377/comments","events_url":"https://api.github.com/repos/nest/nest-simulator/issues/377/events","html_url":"https://github.com/nest/nest-simulator/issues/377","id":157650474,"number":377,"title":"Importing NEST into Python modifies sys.argv ","user":{"login":"heplesser","id":1059644,"avatar_url":"https://avatars.githubusercontent.com/u/1059644?v=3","gravatar_id":"","url":"https://api.github.com/users/heplesser","html_url":"https://github.com/heplesser","followers_url":"https://api.github.com/users/heplesser/followers","following_url":"https://api.github.com/users/heplesser/following{/other_user}","gists_url":"https://api.github.com/users/heplesser/gists{/gist_id}","starred_url":"https://api.github.com/users/heplesser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heplesser/subscriptions","organizations_url":"https://api.github.com/users/heplesser/orgs","repos_url":"https://api.github.com/users/heplesser/repos","events_url":"https://api.github.com/users/heplesser/events{/privacy}","received_events_url":"https://api.github.com/users/heplesser/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nest/nest-simulator/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"apeyser","id":96407,"avatar_url":"https://avatars.githubusercontent.com/u/96407?v=3","gravatar_id":"","url":"https://api.github.com/users/apeyser","html_url":"https://github.com/apeyser","followers_url":"https://api.github.com/users/apeyser/followers","following_url":"https://api.github.com/users/apeyser/following{/other_user}","gists_url":"https://api.github.com/users/apeyser/gists{/gist_id}","starred_url":"https://api.github.com/users/apeyser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apeyser/subscriptions","organizations_url":"https://api.github.com/users/apeyser/orgs","repos_url":"https://api.github.com/users/apeyser/repos","events_url":"https://api.github.com/users/apeyser/events{/privacy}","received_events_url":"https://api.github.com/users/apeyser/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-05-31T11:35:46Z","updated_at":"2016-06-10T12:10:25Z","closed_at":null,"body":"Importing NEST into Python modifies the content of `sys.argv`. It does not matter whether NEST is imported before or after `sys`.\r\n\r\nTo reproduce, save the following code into a file:\r\n```\r\nimport sys\r\nprint \"Before:\", sys.argv\r\nimport nest\r\nprint \"After :\", sys.argv\r\n```\r\nThen run with varying number of command line arguments, e.g.:\r\n```\r\npython st.py A\r\nBefore: ['st.py', 'A']\r\nAfter : ['pynest', 'A']   # (almost) OK\r\n\r\npython st.py A B\r\nBefore: ['st.py', 'A', 'B']\r\nAfter : ['pynest', 'A', 'B']  # (almost) OK\r\n\r\npython st.py A B C\r\nBefore: ['st.py', 'A', 'B', 'C']\r\nAfter : ['pynest', 'C', 'C', 'C']  # BAD\r\n\r\npython st.py A B C D\r\nBefore: ['st.py', 'A', 'B', 'C', 'D']\r\nAfter : ['pynest', 'C', 'D', 'C', 'D']  # BAD\r\n```\r\n\r\nNote that the first entry is changed (`pynest` instead of `st.py`) and, for more than two command line arguments, also subsequent arguments.\r\n\r\nThis bug is **not** present in 2.8.0."},"comment":{"url":"https://api.github.com/repos/nest/nest-simulator/issues/comments/225165648","html_url":"https://github.com/nest/nest-simulator/issues/377#issuecomment-225165648","issue_url":"https://api.github.com/repos/nest/nest-simulator/issues/377","id":225165648,"user":{"login":"apeyser","id":96407,"avatar_url":"https://avatars.githubusercontent.com/u/96407?v=3","gravatar_id":"","url":"https://api.github.com/users/apeyser","html_url":"https://github.com/apeyser","followers_url":"https://api.github.com/users/apeyser/followers","following_url":"https://api.github.com/users/apeyser/following{/other_user}","gists_url":"https://api.github.com/users/apeyser/gists{/gist_id}","starred_url":"https://api.github.com/users/apeyser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apeyser/subscriptions","organizations_url":"https://api.github.com/users/apeyser/orgs","repos_url":"https://api.github.com/users/apeyser/repos","events_url":"https://api.github.com/users/apeyser/events{/privacy}","received_events_url":"https://api.github.com/users/apeyser/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T12:10:25Z","updated_at":"2016-06-10T12:10:25Z","body":"Command line parameters have been liable to corruption since pynest was written. The exact symptoms depend on python version, cython version and compiler. \r\n\r\nPull #393 should fix it. "}}
{"actor":{"display_login":"apeyser"}}