How to run Python scripts with .txt entry in Windows?

0

Hello, I am a beginner here in Stack Overflow and Python, and I need help to run a file from my class whose input is written a .txt file.

I know that in the Linux terminal, for Python 2.7, the command is something like this:

python arquivo.py < entrada.txt

But at the Windows command prompt, how do I pass these arguments?

I've done a lot of research here, but I only found questions about purely running the script, adding Python to the PATH, anyway. I did not find anything related to files as arguments.

Thank you!

    
asked by anonymous 31.03.2018 / 21:35

1 answer

0

I can not test here but I believe type entrada.txt | python arquivo.py should work in Windows. If you are using Python in Windows it may be worth installing Git for Windows , not by < Git in itself but to gain Bash and all its features (and facilities).

    
01.04.2018 / 05:09