{"action":"reopened","issue":{"url":"https://api.github.com/repos/prusnak/micropython-extmod-generator/issues/4","repository_url":"https://api.github.com/repos/prusnak/micropython-extmod-generator","labels_url":"https://api.github.com/repos/prusnak/micropython-extmod-generator/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/prusnak/micropython-extmod-generator/issues/4/comments","events_url":"https://api.github.com/repos/prusnak/micropython-extmod-generator/issues/4/events","html_url":"https://github.com/prusnak/micropython-extmod-generator/issues/4","id":138480438,"number":4,"title":"Input module needs to be on PYTHONPATH","user":{"login":"SpotlightKid","id":5719151,"avatar_url":"https://avatars.githubusercontent.com/u/5719151?v=3","gravatar_id":"","url":"https://api.github.com/users/SpotlightKid","html_url":"https://github.com/SpotlightKid","followers_url":"https://api.github.com/users/SpotlightKid/followers","following_url":"https://api.github.com/users/SpotlightKid/following{/other_user}","gists_url":"https://api.github.com/users/SpotlightKid/gists{/gist_id}","starred_url":"https://api.github.com/users/SpotlightKid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpotlightKid/subscriptions","organizations_url":"https://api.github.com/users/SpotlightKid/orgs","repos_url":"https://api.github.com/users/SpotlightKid/repos","events_url":"https://api.github.com/users/SpotlightKid/events{/privacy}","received_events_url":"https://api.github.com/users/SpotlightKid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-04T13:46:43Z","updated_at":"2016-03-06T20:44:12Z","closed_at":null,"body":"Maybe the path of the input module should be added to sys.path in the `generate` script?\r\n\r\n```\r\n$ ./micropython-extmod-generator/generate testmod1\r\nLooking for module \"testmod1\":\r\nTraceback (most recent call last):\r\n  File \"./micropython-extmod-generator/generate\", line 241, in <module>\r\n    main()\r\n  File \"./micropython-extmod-generator/generate\", line 234, in main\r\n    module = Module(sys.argv[1])\r\n  File \"./micropython-extmod-generator/generate\", line 66, in __init__\r\n    self.module = importlib.import_module(name)\r\n  File \"/usr/lib/python3.5/importlib/__init__.py\", line 126, in import_module\r\n    return _bootstrap._gcd_import(name[level:], package, level)\r\n  File \"<frozen importlib._bootstrap>\", line 986, in _gcd_import\r\n  File \"<frozen importlib._bootstrap>\", line 969, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 956, in _find_and_load_unlocked\r\nImportError: No module named 'testmod1'\r\n\r\n$ PYTHONPATH=. ./micropython-extmod-generator/generate testmod1\r\nLooking for module \"testmod1\":\r\nFound <module 'testmod1' from '/[...]/testmod1.py'>\r\nParsed OK ... loaded 1 functions and 1 classes with 1 methods\r\nGenerating source code:\r\nDone\r\nSaved source as modtestmod1.c\r\nSaved qstrdefs as modtestmod1-qstrdefs.h\r\n```"}}