user1884248
user1884248

Reputation: 11

Write Python output to file using makefile

I have a Python program prog.py, that I want to run on a file input, and then write its output to output.txt.

In the terminal, this works fine if I type:

$ python prog.py < input.py > output.txt

Now, I would like to have a makefile that does this same thing. How do I do this?

Upvotes: 1

Views: 621

Answers (1)

In your makefile simply have:

all:
    python prog.py < input.py > output.txt

Upvotes: 1

Related Questions