打印功能不会在 sublime text 3 控制台上显示输出 [英] print function does not show output on sublime text 3 console

查看:73
本文介绍了打印功能不会在 sublime text 3 控制台上显示输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我今天开始使用 Python,但遇到了一个奇怪的问题.我正在使用 Python 3.5.1 和 Sublime text 3 并编写了一个基本的 hello world 程序.

print('Hello World')

使用名称 python1.py 保存此文件并按 Ctrl+B 执行它,但控制台上唯一显示的是 [Finished in XYZs],这意味着程序成功执行但未显示输出.

注意:我使用的是 Windows 8(如果这很重要)并且 Python 安装正确,我可以从 CMD 运行我的程序,没有任何问题.

解决方案

解决了,

Ctrl+Shift+B 之后会弹出一个列表,从该列表中选择python 并完成.下次只需按 Ctrl+B 即可.

'Ctrl+Shift+B' 表示构建此代码然后运行它"而不是简单地编译它

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.

解决方案

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

这篇关于打印功能不会在 sublime text 3 控制台上显示输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆