gknows / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

Auto-competion with import #230

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With PyScripter frequently I (and I'm sure not only myself) miss 'import'
auto-completion.

Case 1:
1. Type 'import ' in the code editor/interpreter.
2. Press "Ctrl-space".

Expected:
List of all found top-level packages in the current PYTHONPATH. Futher,
after pressing '.' (dot) it should list all subpackages/modules in the
preceding one.

Actual:
Nothing happens.

Case 2:
1. Type 'from package.module import ' in the code editor/interpreter.
2. Press "Ctrl-space".

Expected:
List of all public names in the module.

Actual:
Nothing happens.

TIP:
To avoid common problem with this in some proprietary Python IDEs I suggest
implement this feature by using Python engine to retrieve public names
(i.e. run module's initialization code). 
Thus we will see all dynamic members that could be imported into module to
be imported.

Original issue reported on code.google.com by irium....@gmail.com on 14 Jun 2008 at 1:24

GoogleCodeExporter commented 9 years ago
This is a planned feature. 

Original comment by pyscripter on 15 Jun 2008 at 11:04

GoogleCodeExporter commented 9 years ago
Yes, it will be great!

Original comment by irium....@gmail.com on 16 Jun 2008 at 12:30

GoogleCodeExporter commented 9 years ago
I would like it too.

Original comment by dghela...@gmail.com on 6 Aug 2008 at 7:40

GoogleCodeExporter commented 9 years ago
Yes I would love to have this too...

Original comment by vsapr...@gmail.com on 31 Dec 2008 at 9:59

GoogleCodeExporter commented 9 years ago
Fixed in version control.  It works both in the editor and the interpreter.  
Support for relative imports also provided e.g. (^ stands for pressing 
Ctrl+Space) 

import ^
import in^
import inspect as isp, cty^
from ^
from inspect import g^
from inspect import a as b, g^
from ..modname import a as b, g^
from .. import modname as m, another^

Original comment by pyscripter on 23 Sep 2010 at 11:03