honas grael
2016-03-17 20:46:31 UTC
Hi I'm using python's cmd.cmd module(aka cmd module), essentially I have a
function like
do_simple_test(line)
*run the test file*
When I run it, I get a nice little console typing
simple_test(test_filename.txt), allows me to run the tests contained in the
text file that I typed in.
This works well, but I want to take the automation one step further. I
converted my *main.py* into an executable *main.exe* using py2exe. It still
works fine.
What I now want is to be able to launch main.exe with the test_filename.txt
as a parameter so
main.exe test_filename.txt
so that it will execute
simple_test(test_filename.txt)
That would give me the freedom to change the argument with which I call
main.exe, without having to type the appropriate command in the console
window.
I am running python 2.7.10 on Windows Is it possible to do this, and how?
Thank you
function like
do_simple_test(line)
*run the test file*
When I run it, I get a nice little console typing
simple_test(test_filename.txt), allows me to run the tests contained in the
text file that I typed in.
This works well, but I want to take the automation one step further. I
converted my *main.py* into an executable *main.exe* using py2exe. It still
works fine.
What I now want is to be able to launch main.exe with the test_filename.txt
as a parameter so
main.exe test_filename.txt
so that it will execute
simple_test(test_filename.txt)
That would give me the freedom to change the argument with which I call
main.exe, without having to type the appropriate command in the console
window.
I am running python 2.7.10 on Windows Is it possible to do this, and how?
Thank you