Output in VS, not in python.exe cmd window

Mar 12, 2011 at 6:42 PM

Hello.

At first I want to thank you for such an awesome thing, it's really cool. I have only one trouble, may be someone could help me solve it? 

When you use NetBeans+python, all exceptions, prints and other things like that show in IDE, and it's really good for debugging. But in VS when you launch some script, for example something simple like

 

try:
    print 10/0
except Exception,e:
    print e

a console window of python appears and then disappears immediately so I even can't read it.

Is there any way to make script output directly into VS?


 

Mar 18, 2011 at 3:28 PM
Edited Mar 18, 2011 at 7:02 PM

Looking forward to hear the solution for this question too.

Coordinator
Mar 18, 2011 at 5:34 PM

Do you want this only for debugging (and not run w/o out debugging?)  We can certainly tee the output (maybe via an option) to both the console window and to the debug output window when we're debugging. 

Mar 18, 2011 at 6:35 PM

Yes, only for debugging.

Mar 18, 2011 at 7:02 PM
Edited Mar 18, 2011 at 7:03 PM

At least debugging would great (for me)

Mar 15, 2013 at 8:49 AM
I've a related question so I'm resurrecting this thread. Is it possible to route output only to VS and completely hide interpreter's window?
Coordinator
Mar 15, 2013 at 3:26 PM
We don't have an option specifically for that, but if your program can run with pythonw.exe instead of python.exe then you can select the "Windows Application" option in project properties. This does mean that for Ctrl+F5 (run without debugging) you may not see any output at all. Also, because we don't support stdin inside VS, calls to input()/raw_input() require an actual console.
Apr 9, 2013 at 6:02 PM
Works like a charm, thank you, Zooba. (Really enjoying Python Tools, BTW.)