Running a txt file with other application in Python

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • afshin
    New Member
    • May 2012
    • 4

    Running a txt file with other application in Python

    Hello experts

    I have a txt file which should be run in another application. Manually, I should open the launcher of that application and then browse the txt file, then run it, and finally getting the results. However, I need to do it within Python. Lets say the txt file is afshin.txt and it should be run with abc.exe, the result files are also produced in the same directory as result.txt. I am looking forward to your answer.
  • dwblas
    Recognized Expert Contributor
    • May 2008
    • 626

    #2
    You would use subprocess.call to run "abc.exe afshin.txt" if I understand your question.

    Comment

    Working...