python - use ipython to get REAL code-completion in pycharm -


many python ide's boasts of providing code-completion (code insight), pycharm 1 of ide's. however, seems me provided code-completion extremely limited. let me give example make clear:

import numpy np m = np.random.random((3,5)) m. 

hitting ctrl-space after 'm.' not give me code-completion, -no matter how hard hit ;).. guess because ide have type inference know type of variable 'm', , isn't trivial in domain of dynamic programming languages.

now, pycharm comes setting called "collect run-time types information code insight", indeed sounds promising. however, doesn't seem fix problem mentioned above.. still not able code-completion on variable 'm'.

thus far, have found 1 way code-completion on variables in pycharm:

import numpy np m = np.random.random((3,5)) ''':type : np.matrix''' m. 

in example able code-completion when pressing ctrl-space after 'm.', , because helping ide specifying type of variable docstring. am, however, not satisfied way of getting code-completion, because adds unnecessary verbosity code these docstrings (not mention keyboard-typing)...

ipython rescue.. (maybe?)

now, if start ipython in linux-terminal, , enter first piece of code, able code-completion way, -even variable 'm'. (where code-completion in ipython achieved pressing tab instead of ctrl-space)..

i don't have experience ipython, believe i've heard ipython executing code in loop or that...

i thinking should possible use ipython achieve real code-completion on variables in editor of pycharm....

is there way setup pycharm use ipython code-completion?

note not satisfied sending code terminal window/console, or that, want code-completion inside editor of pycharm...

i have looked @ questions adding ipython interpreter in pycharm ubuntu, seems using ipython in console, -not in editor... there plenty of questions talking code-completion in ide's, seem have same unsatisfying level of code-completion pycharm...

my setup

  • os: debian testing
  • python: python3 , ipython3
  • ide: pycharm 3.0.2 professional edition

i had same question, found answer here: https://www.jetbrains.com/pycharm/help/using-ipython-notebook-with-pycharm.html

what need create ipython notebook in project tool window. file extension '.ipynb'. right click on directory want put file, select 'new-->file', enter file name in dialog box , give file extension .ipynb. open notebook file , when start type in window, drop down window appears objects in namespace plus commands start letters typed.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -