nose - How to run multiple python file in a folder one after another -


this question has answer here:

i have around 20 python files.

each time run these files in terminal form 1 after :

python a.py python b.py python c.py python d.py python e.py python f.py python g.py . . . 

(i have provided general file names here)

this process takes lot of time.

is possible run these file 1 after through script..?

if possible, how..?

please provide code if possible...

i came know through few sites that, using bash script can that..

i don't know how implement it.

if can suggest other method, helpful.

edits:

and need generate report each file using nosetests.

the problem facing nosetests that, creates html file name results.html.

each time report created, latest html file replaces old html file. beacuse names same.

so doing is, renaming report each time run nosetests python file. run nosetests second file, report gets generated, , rename it.. goes on...

if tell me how can overcome this, helpful..

i working on ubuntu 14.04

to run dynamically python scripts in given folder your_folder, run bash script like:

#!/bin/bash  py_file in $(find $your_folder -name *.py)     python $py_file done 

Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -