First time here? Check out the FAQ!
1

Wingpro failed to do the autocompletion for pint package.
 

Hi,

The environment is Ubuntu 20.04 and python 3.8.3, I installed pint package. I find that even in the debug mode, wingpro still fail to do some autocompletion for it. Say, for the following example:

from pint import UnitRegistry
ureg = UnitRegistry()

ureg.eV

When I input ureg.e[tab], the eV doesn't appear in the autocompleting list.

Any hints for this problem? Regards,

HY

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
hongyi-zhao's avatar
557
hongyi-zhao
asked 4 years ago
Wingware Support's avatar
4.3k
Wingware Support
updated 4 years ago

Comments

see more comments

1 Answer

0

Because of how pint is implemented you need to turn on the Debugger > Introspection > Allow Calls in Data Inspection preference in Wing before this will work. That is potentially dangerous so is off by default. In some code bases it could lead to unwanted side effects such as change in program state, or it could lead to crashing of code that is never exercised outside of Wing's debugger doing its inspections. As far I could tell it does seem to work fine with pint, however.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Wingware Support's avatar
4.3k
Wingware Support
answered 4 years ago
link

Comments

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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)