本文介绍了Python的IDLE。自动完成/显示的完成不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

IDLE正在何时它实际上将显示一个自动完成菜单非常狡猾。为晚它尚未在所有工作,或者更具体地,只有一个交互式会议期间工作。

IDLE is being very dodgy as to when it will actually show an Auto-complete menu. As of late it hasn't been working at all, or, more specifically, only works during an interactive session.

我一直在使用code块为C,并已经得到了真正使用到非常漂亮的自动完成功能,所以这是一个有点沮丧没有他们 - 尤其是在努力学习新的帧的工作,什么类与方法有关,等等,等等。

I've been using Code Blocks for C, and have gotten really used to the very nice auto-complete features, so it's a bit frustrating not having them -- especially while trying to learn a new frame work and what class is associated with which methods, etc, etc..

有一个简单的办法来获得空闲自动完成再次合作?我使用Python版本2.7。

Is there an easy fix to get IDLE auto-complete working again? I'm using python version 2.7.

有可能是一个简单的编辑,我应该考虑?我已经试过Vim的,这是我的简单的需求,忍者,我不能得到任何东西的工作,以及崇高的文本2,我不能让我的wxPython的东西玩了一点过重。什么会一个不​​错的选择呢?任何类似code块会很酷,虽然,我会用空闲心甘情愿它是否会一直努力!

Is there perhaps a simple editor I should look into? I've tried Vim, which was a little too heavy for my simple needs, Ninja, which I couldn't get to work for anything, and Sublime text 2, which I couldn't get my wxpython stuff to play with. What would a nice option be? Anything similar to Code Blocks would be cool, although, I'd be perfectly happy with IDLE if it would consistently work!

请求澄清:
好了,看来我可以有我的一些术语的倒退。非交互式的,我的意思是,比如,右击一个文件PY和selcting编辑与空闲。这带来了一个文本编辑器,我想可能是描述。你可以在这里输入你code。一旦准备就绪,你再按下F5,或选择运行,它会启动(我一直在这里所指的)交互式终端。正是在这里,你可以在code,preSS返回类型,瞬间有code评估。

REQUESTED CLARIFICATION:OK, so it seems I may have some of my terminology backwards. By non-interactive, I mean, for instance, right clicking on a py file and selcting "edit with IDLE". This brings up what I guess could be describes as a text editor. You can enter all you code here. Once ready, you then hit F5, or select Run, and it launches (what I've been referring to as) the interactive terminal. It's here that you can type in code, press return, and instantly have that code evaluated.

什么,我的问题是指无论是前者,在这里编辑code空闲的一部分。有时候打字时,经过了。它会显示可用的方法,或开括号后,它会提示给作为预期值。但事情是,有时做这些事,有时没有。

What my question is referring to it the former, the part of IDLE where you edit the code. Sometimes while typing, after a . it will display the available methods, or after an open parenthesis it'll give hints as to the values expected. but the thing is, sometimes it does these things, sometimes it doesn't.

推荐答案

我迄今为止发现的唯一的事情是,如果IDLE的编辑会话与蟒蛇外壳连接(称为互动模式的问题,即后尝试运行编辑过的脚本),然后在非交互式IDLE可以自动完成基于交互式窗口值。例如,如果我键入

The only thing i found so far is that if an editing session of IDLE is connected with python shell (called "interactive mode" in the question, i.e. after an attempt to run the edited script) then "non-interactive" IDLE can autocomplete based on values in interactive window. For example, if I type

a = [];
a.appen

然后打<标签>它会做什么,但如果我previously型

and then hit < Tab > it will do nothing, but if I previously type

a = []

在相应的蟒蛇外壳,IDLE将正确自动完成。

in corresponding python shell, IDLE will autocomplete correctly.

所以,我唯一的建议是在python shell窗口相同的名称相同的输入模块,以使他们看得见非交互IDLE编辑器。

So my only suggestion is import same modules with same names in python shell window in order to make them "visible" for non-interactive IDLE editor.

这篇关于Python的IDLE。自动完成/显示的完成不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 12:38