Glenn
When I said I didn't know about imports, what I was trying to say was that I was unaware of the capability to import local modules. I've been copy/pasting "utility" defs for too long. Thanks for the pointer.
The hook will have to build a string of info for the front-end python script. This will be the username and the modules affected. The PythonAnywhere front-end python will take that data and call the syntax check with the username and for each module, with those names enough to build a path to pass to httplib2 to open up the file under GitHub, which is the best solution. From talking to others curl can pass parameters. (I may need some coaching on that or a link to a good resource page, with examples, on curl. Google search can find the good, the bad, and the ugly.)
Relative to the response, I thought the front-end script could open a tempfile while the syntax checker script writes to it with the issues (in formatted HTML). When all files have been checked,, that front-end script would have to "stream" that HTML data back to the hook for it to display to the user. No data (empty) coming back indicates success so that the hook can let the commit complete