This is not the same as "What is the purpose of the -m switch" as I'm talking about a function that runs independently (flask) and wanting to know why it works differently with -m. The answers there do not resolve the question.
I have a flask app that I'm building. It's set up with a subdirectory for the code, so
setup.py
gallery/
__init.py__
models.py
view.py
When I run it using 'python -m flask run' it works. When I run it just as 'flask run' it doesn't. I haven't been able to find anyone who knows what the actual difference is between the two commands, so I'm kind of stuck.
Here's the output from 'flask run':
(venv)MacBook-Pro-4:Finished khunter$ export FLASK_APP=gallery
(venv)MacBook-Pro-4:Finished khunter$ flask run
Usage: flask run [OPTIONS]
Error: The file/path provided (gallery) does not appear to exist. Please
verify the path is correct. If app is not on PYTHONPATH, ensure the
extension is .py
Any thoughts about where the difference lies so I can use 'flask run' appropriately?
EDIT: It looks like I can get through this with pip install --editable to grab the setup.py I have there.