Pycharm常用操作

1.console清屏

Pycharm常用操作

在console的位置,右键,点击clear All。

2.查看文档

Shift+F1

3.PyCharm中运行当前打开的文件

ctrl + shift +f10

4.查看当前是否在运行程序

Pycharm常用操作

运行时右上角会有小圆圈

Pycharm常用操作

没有运行时状态。

5.命令行中升级已经安装的包

pip2 install -U numpy

6.安装好scikit-learn后import sklearn出错。

DLL load failed:

这是因为没有安装相应的numpy+mkl包。

7.PyCharm控制台输出乱码

File->Settings->Editor->File Encodings->Global Encoding改为GBK。

Pycharm常用操作

8.pycharm中打开终端

Pycharm常用操作

9.pycharm控制台print输出时不换行就不能输出结果问题

例如:

print("123",end='')
print.__doc__
"print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)

Prints the values to a stream, or to sys.stdout by default.
Optional keyword arguments:
file:  a file-like object (stream); defaults to the current sys.stdout.
sep:   string inserted between values, default a space.
end:   string appended after the last value, default a newline.
flush: whether to forcibly flush the stream."
print("123",end='',flush=True)
123

刚开始不输出结果,查看print函数的文档得知,没有遇到换行时,它会缓存,这里把默认的flush=false改为true,清除缓存,就有输出了。

发表评论
留言与评论(共有 0 条评论) “”
   
验证码:

相关文章

推荐文章