Sign up ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

How to run a batch file, send commands and collects output on windows


it outputs 1 and a window appears and then disappears. I also want to send my script file to python shell and collect its output in mathematica. How to do on Windows?

ReadList["!C:\\Python27\\python.exe", "my_script_file.txt"]
share|improve this question

closed as off-topic by Oleksandr R., m_goldberg, Karsten 7., ilian, Jens Sep 27 at 5:50

  • The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

Have a look at 1894 –  b.gatessucks Oct 22 '13 at 7:35
It outputs 1 because the batch script outputs 1 as its result. This is a number meant to indicate the success of the script's execution. Run is a very simple command. It runs a string as if you had put it into the command prompt. That's really it. –  Searke Oct 23 '13 at 15:17
I'm voting to close this question as obsolete because it is not clear why OP could not get this to work, and they have not been seen again for the past 18 months. –  Oleksandr R. Sep 27 at 2:27