0

Suppose I have two python file both are pulling two different types of data, My requirement is instead of running the two separate python file, I want a single python by which I can run both the python file one by one. I don't want to make any changes to both the python file.

Suppose the name of both the file is abc.py and xyz.py

Aquil Abbas
  • 167
  • 2
  • 11
  • Why not use a bash or batch script to do this? – Darney Feb 27 '17 at 03:58
  • This is a duplicate of this http://stackoverflow.com/questions/7974849/how-can-i-make-one-python-file-run-another – FancyDolphin Feb 27 '17 at 03:59
  • Possible duplicate of [How can I make one python file run another?](http://stackoverflow.com/questions/7974849/how-can-i-make-one-python-file-run-another) – FancyDolphin Feb 27 '17 at 04:00
  • Sir I don't want to make any changes to my existing python script. I want a separate python file through which i can call both the python file one by one. – Aquil Abbas Feb 27 '17 at 04:24
  • Just copy one file and paste it to end of another. Or write a script to run both, one after another. – Prajwal Feb 27 '17 at 04:35
  • FancyDolphin the script you are talking about is different, as in that script 1 is somehow using in Script 2, so import will work, But I am asking to call two different script not related to each other just by calling a single script. In the new script I just have to give the path along with the script name and that script execute the named script one by one, not overlapping each other. – Aquil Abbas Feb 27 '17 at 08:11
  • Prajwal 3: I have tried what you suggest but it will not work. Better to give some example – Aquil Abbas Feb 27 '17 at 08:11

0 Answers0