{"action":"created","issue":{"url":"https://api.github.com/repos/ntoll/circup/issues/8","repository_url":"https://api.github.com/repos/ntoll/circup","labels_url":"https://api.github.com/repos/ntoll/circup/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/ntoll/circup/issues/8/comments","events_url":"https://api.github.com/repos/ntoll/circup/issues/8/events","html_url":"https://github.com/ntoll/circup/issues/8","id":488715166,"node_id":"MDU6SXNzdWU0ODg3MTUxNjY=","number":8,"title":"Extracting __version__ value from .mpy","user":{"login":"dhalbert","id":2847802,"node_id":"MDQ6VXNlcjI4NDc4MDI=","avatar_url":"https://avatars0.githubusercontent.com/u/2847802?v=4","gravatar_id":"","url":"https://api.github.com/users/dhalbert","html_url":"https://github.com/dhalbert","followers_url":"https://api.github.com/users/dhalbert/followers","following_url":"https://api.github.com/users/dhalbert/following{/other_user}","gists_url":"https://api.github.com/users/dhalbert/gists{/gist_id}","starred_url":"https://api.github.com/users/dhalbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhalbert/subscriptions","organizations_url":"https://api.github.com/users/dhalbert/orgs","repos_url":"https://api.github.com/users/dhalbert/repos","events_url":"https://api.github.com/users/dhalbert/events{/privacy}","received_events_url":"https://api.github.com/users/dhalbert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-09-03T16:50:47Z","updated_at":"2019-09-06T17:44:06Z","closed_at":null,"author_association":"NONE","body":"If you run `strings` on a .mpy, you can find the version number close to `__version__`. It seems to be always just before, but I haven't done an extensive check, e.g.\r\n```\r\n$ strings neopixel.mpy\r\n...\r\nneopixel_write\r\nneopixel_write\r\n3.3.7\r\n__version__\r\n__repo__\r\n...\r\n```"},"comment":{"url":"https://api.github.com/repos/ntoll/circup/issues/comments/528948423","html_url":"https://github.com/ntoll/circup/issues/8#issuecomment-528948423","issue_url":"https://api.github.com/repos/ntoll/circup/issues/8","id":528948423,"node_id":"MDEyOklzc3VlQ29tbWVudDUyODk0ODQyMw==","user":{"login":"dhalbert","id":2847802,"node_id":"MDQ6VXNlcjI4NDc4MDI=","avatar_url":"https://avatars0.githubusercontent.com/u/2847802?v=4","gravatar_id":"","url":"https://api.github.com/users/dhalbert","html_url":"https://github.com/dhalbert","followers_url":"https://api.github.com/users/dhalbert/followers","following_url":"https://api.github.com/users/dhalbert/following{/other_user}","gists_url":"https://api.github.com/users/dhalbert/gists{/gist_id}","starred_url":"https://api.github.com/users/dhalbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhalbert/subscriptions","organizations_url":"https://api.github.com/users/dhalbert/orgs","repos_url":"https://api.github.com/users/dhalbert/repos","events_url":"https://api.github.com/users/dhalbert/events{/privacy}","received_events_url":"https://api.github.com/users/dhalbert/received_events","type":"User","site_admin":false},"created_at":"2019-09-06T17:44:06Z","updated_at":"2019-09-06T17:44:06Z","author_association":"NONE","body":"Importing the module might be OK, though it requires resetting the board at some point to clear that out.\r\n\r\nI wasn't necessarily thinking of using `strings` itself, but instead finding `__version__` in the .mpy and then looking nearby for something that looks like a version string. Could use a Python regexp over the whole .mpy file for that."}}
{"actor":{"display_login":"dhalbert"}}