1

I've been working at a task for college for several hours now. I spent an hour doing the actual problem and the rest trying to achieve what I'm asking:

A python script needs to receive its input via stdin, preferably data that was redirected from a file (so I can test it), and it has to output the data to stdout in a way that I can see what it is (maybe redirect it to another file).

Please don't tell me that the Enterprise version of Visual Studio doesn't have way to feed a file data through stdin and print what comes out on stdout.

I understand how to do it internally, from the script, I just don't know where I put the data I want VS to send to stdin. I've opened the interactive terminal and started the debugger and cmd window waited for the input. Once I copied it in, nothing happened. I tried ctrl+D, still nothing.

What do I do?

Karlovsky120
  • 6,212
  • 8
  • 41
  • 94
  • You can modify your command line for running the program to include `< stdin.txt` where that's the name of the file you want to use as input. This isn't really a Python thing at all, more a Visual Studio thing. See e.g. https://stackoverflow.com/questions/14043986/debugging-with-visual-studio-using-redirected-standard-input – kindall Mar 27 '19 at 00:47
  • Goddamn stupid thing goes in the script arguments slot without the "<". Then it works. – Karlovsky120 Mar 27 '19 at 00:51

0 Answers0