问题
I have started off with Python today and stuck with a weird problem. I am using Python 3.5.1 and Sublime text 3 and have written a basic hello world program.
print('Hello World')
Saved this file with the name python1.py and pressed Ctrl+B to execute it but the only thing that shows up on the console is [Finished in XYZs] which means that the program sucessfully executes but no output shown.
NOTE: I am using Windows 8(If that's important) and Python is installed properly and I can run my programs from CMD with no problems.
回答1:
Solved it,
Press Ctrl+Shift+B
after which a list pops up, select python from that list and its done. From next time just pressing Ctrl+B
will work.
'Ctrl+Shift+B' Means "Build this code and then RUN it" instead of simply compile it
回答2:
press Shift-Ctrl-B
and select python. That happens because the program only checks if your python program is correctly. The next time just pressing Ctrl+B
, will work
回答3:
- SHIFT-CTRL-B
- CTRL-B ( next time onwards)
来源:https://stackoverflow.com/questions/37626397/print-function-does-not-show-output-on-sublime-text-3-console