新手求助,无法调出pycharm 打开console的console-CSDN论坛

pycharm安装后TOOL里面的run python console是灰色的...其他菜单栏里面也有很多灰色,求详细解~_百度知道
pycharm安装后TOOL里面的run python console是灰色的...其他菜单栏里面也有很多灰色,求详细解~
我有更好的答案
它叫布布,韩国的.不是泰迪熊吧,泰迪熊是棕色的
其他类似问题
为您推荐:
pycharm的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁使用Pycharm Python Console出错 - 开源中国社区
当前访客身份:游客 [
当前位置:
每次使用Execute Line in Console输入参数都会报错
Traceback (most recent call last):
File &&console&&, line 1, in &module&
共有0个答案
更多开发者职位上
有什么技术问题吗?
raidyue...的其它问题
类似的话题1385人阅读
Python(17)
定位到函数定义
在函数名处 Ctrl + B
就会快速定位到函数定义处
在Console中执行文件
全选内容后,右键菜单
Execute Selection in Console
或者快捷键 Alt + Shift + E
设置工作目录,这样一些数据文件可以用文件名快速访问
&&& import os
&&& os.chdir('C:\\GitHubRepositories\\PythonProjects\\ML2')
4.设置编译目录,可以直接在PythonConsole中load相关文件
sys.path.extend(['C:\\GitHubRepositories\\PythonProjects\\ML2'])
Python3.5 已经不能直接reload, 必须使用如下:
&&& import importlib
&&& importlib.reload(kNN)
如何读取含有 环境变量的路径 :
使用os.path.expandvars函数
os.path.expandvars(r”%windir%\fonts\simsun.ttc”)
参考如下:
Python 3.5
string.format:
一个例子:
将数字转化为一个颜色
"#{0:06X}".format(random.randint(0, 0xFFFFFF))
https://docs.python.org/3/library/string.html
Python 3.5 Annotation 在PyCharm中的应用
注意在表示参数是 tuple,list时要先:
from typing import Tuple
from typing import List
随后写如下语句:
def file_to_matrix(a_filename: str)-& Tuple[ndarray, list, dict, List[str]]:
def file_to_matrix(a_filename: str)-& tuple[ndarray, list, dict, list[str]]:
否则会报错:
def file_to_matrix(a_filename: str)-& tuple[ndarray, list, dict, List[str]]:
TypeError: ‘type’ object is not subscriptable
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:591238次
积分:8799
积分:8799
排名:第1436名
原创:295篇
转载:16篇
评论:113条
(4)(5)(5)(2)(2)(3)(3)(2)(1)(5)(6)(1)(2)(2)(1)(3)(6)(1)(4)(3)(1)(10)(10)(5)(2)(8)(3)(3)(3)(10)(3)(9)(10)(9)(7)(10)(4)(3)(2)(3)(2)(1)(4)(3)(8)(2)(6)(4)(4)(1)(2)(2)(1)(1)(2)(11)(2)(4)(1)(3)(2)(4)(2)(5)(3)(5)(7)(2)(6)(5)(2)(4)(4)(1)(1)(1)(3)(2)(3)(4)(6)(6)(4)(8)(1)(1)(1)(1)python新手求解这段代码为何在pycharm中无法运行_百度知道
python新手求解这段代码为何在pycharm中无法运行
readline())
print(&#39.stdin,command=draw)btnfrom tkinter import*tk=Tk()canvas=Canvas(tk,100)
b=int(sys,height=500)canvas.randint(0.pack()def draw(),b1+b)btn=Button(tk:
import sys
print('width&#39.create_rectangle(a1.randint(0;)
a=int(sys,width=500;height&#39,text=&#39,100),b1,a1+a;draw one rectangle&#39.pack()tk.stdin.readline())
import random
您的回答被采纳后将获得:
系统奖励20(财富值+经验值)+难题奖励10(财富值+经验值)+提问者悬赏100(财富值+经验值)
我有更好的答案
试了一下,是库名大小写错了,第一句改为下面就okfrom Tkinter import *
  貌似那个地方没错。。。  这段代码在shell中可以正常运行  但在pycharm中点击按钮后
你把a=int(sys.stdin.readline())换成a=input()b=int(sys.stdin.readline())换成b=input()试一下
其他类似问题
为您推荐:
pycharm的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 pycharm console 的文章

 

随机推荐