So my directory structure is like this:
parent_folder
my_project
__init__.py
__main__.py
models
__init__.py
a_model.py
controllers
__init__.py
a_controller.py
utilities
__init__.py
a_utility.py
The way I'm executing my_project right now, is by launching a terminal in parent_folder and then executing the following command:
python -m my_project
This works fine. However, I wish to execute this from within a PHP script:
<?php
$output=shell_exec('python /path/to/parent_folder -m my_project');
echo "<pre>$output</pre>";
?>
Though, it's not working. Being new to python, I am just wondering what is the way to do this?