Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
217 views
in Technique[技术] by (71.8m points)

python - iPython Code Completion / Intellisense on Dot Possible?

As someone trying to learn the ins and outs of Python (with emphasis on scientific computing - ie: pandas, numpy, scikit-learn), most of the gurus out there seem to recommend and use iPython notebooks. My biggest sticking point as a beginner/intermediate coder is that I NEED code completion / intellisense -like functionality from an IDE to learn the function parameters. I'm not hard-wired yet to just know what parameters are available at my current development.

In iPython, I noticed I can press Tab to show the drop-down of options (seen below as pd.) but I don't want to have to hit each time. That's not user-friendly for my needs. Instead, I would like it to show only available classes and methods when I press dot.

Secondly, I notice that if I did say pd.read_csv(<TAB>, I get a lot more options than are the actual parameters in read_csv.

Question: Can iPython automatically show accurate code completion options instantly after pressing dot / period? Also, is there a way to configure it to only show the available function parameters when within a function?

To make this question super-specific, I'm not asking about using any other IDE; I'm asking very specifically in regards to just iPython and wondering if there's a way to set some kind of configuration to achieve accurate "dot" display options instantly when pressing "dot" (no time delay).

enter image description here

Example below shows Desktop which is obviously not a parameter of pd.read_csv().

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can press <Shift>-<Tab> to get a tooltip showing the function's signature:

enter image description here

Alternatively, invoking zip? opens a documentation pane at the bottom of the window.

As far as having the tooltip open automatically, I'm unsure. I'd guess that it isn't possible via configuration.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...