I am using emacs24 with python.el (package shipped by emacs)
My workflow is usually the following:
- Writing python code in
my_code.py - Writing tests in
tests.py - Execute tests from command line
- Goto step 1
I would like to start the tests.py from shell without leaving emacs (or opening a shell buffer), to see the results and go on coding.
So far I could only find the possibility to run the tests.py script in buffer (py-execute-buffer). In this case, the interpreter ignores the if __name__ == '__main__' condition. Also there is no way to pass command line arguments.
Is there a way to define so called run-configurations, i.e. "run file xy.py with n command line arguments and use the interpreter in path x/y/z" ?