Read up on require / include. It will execute php code, not python code. In order to execute the python code you will need to run a shell_exec type command from php, which should execute the python code like you would call it from the shell.
The gist, the include / require options are used for including php files to be parsed by the php engine. Including random files with commands that are not php will attempt to parse the file using the php engine.
EDIT
If the shell_exec
is not what you are looking for, maybe a redirect is or you may have to elaborate on your question to get down to what you really need.