1

I am new to python and just started learning it today.

I have installed Python Tools for Visual Studio 2010 and using VS as my Editor.

My test python programs run correctly but the at the last line in the output window I see the following

The thread 'Python Thread' (0x6f4) has exited with code 0 (0x0).

Please advice me what this error means and how can I resolve it. Thanks a bunch in advance!

Edit: Also, whenever I try to run my program by pressing F5 (Start Debugging), it opens up a command window titled c:\Program Files\Python32\python.exe, it seems to be calling the main python file from its location. Is it supposed to open up that command window for a second? I suspect if that command window is the "Python Thread" in question.

Edit_2:

For all the future new explorers or python:

If you are using Python Tools for Visual Studios, you might want to build your program with Shift+Alt+F5 instead of just F5. This will output in Python interactive window inside VS and it will not display annoying command window popup.

Johan Råde
  • 20,480
  • 21
  • 73
  • 110
John Connor
  • 3,347
  • 3
  • 18
  • 13

1 Answers1

5

That means the script executed successfully. If the code was anything other than zero, that would indicate an error.

Yes, that command window is likely the "Python Thread".

icktoofay
  • 126,289
  • 21
  • 250
  • 231
  • So is this expected behavior? I am watching some python tutorial videos, they are using different IDEs, but I dont see this message in other IDE Outputs. – John Connor Oct 09 '11 at 03:43
  • Yes, it's expected. Other IDEs may only show the exit code if it's non-zero, since a zero exit code doesn't indicate anything to be worried about. – icktoofay Oct 09 '11 at 03:44
  • Yeah, it's expected. Don't worry about it. :) – RylandAlmanza Oct 09 '11 at 03:45
  • If you're running Python from the command line, you can see the exit status in Windows by typing `echo %ERRORLEVEL%` or on UNIX-like systems by typing `echo $?`. – icktoofay Oct 09 '11 at 03:48