First time here? Check out the FAQ!
1

Tab-completion only available when entering the debug mode for some python packages.

Hi,

I try to run the AiiDA-core python package with the example given here.

According to the instructions here: https://aiida.readthedocs.io/projects..., I can use the verdi shell command to invoke a ipython shell which can do the completions correctly.

But when I edit the above mentioned script with wing, then the corresponding completions will be disabled. Say for the following code snippets:

from aiida import load_profile
load_profile()

from aiida.engine import submit
from aiida.orm import load_node, Code, Dict

code = Code.get_from_string("wannier90-3.1.0-wannier-manual")  # REPLACE <CODE LABEL>
# Prepare the builder to launch the calculation
builder = code.get_builder()

All of the builder.* part will not have completion suggestions. On the other hand, if I put the cursor at the end of the above code block and then running the code with Debug to Cursor ( Alt + F5 ). At the end, the corresponding completions will be enabled.

But how to enable the tab-completion without entering the debug mode?

Any hints for this problem?

Regards

hongyi-zhao's avatar
507
hongyi-zhao
asked 2020-04-04 03:13:44 -0500
Wingware Support's avatar
4k
Wingware Support
updated 2020-04-07 08:14:35 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

If you're not debugging or working in the Python Shell, Wing is using only static analysis to offer completion, and the code where it's failing is created dynamically in a way that resists static analysis. You can get Wing to also use dynamic/runtime analysis by setting a breakpoint and running to it, or working interactively in the Python Shell. That way it should be reporting what is actually there at runtime, as does any shell like iPython.

Wingware Support's avatar
4k
Wingware Support
answered 2020-04-06 07:07:05 -0500, updated 2020-04-06 07:14:51 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer