开发者

Problem importing wx with PyDev - undefined variable import

开发者 https://www.devze.com 2023-04-07 06:25 出处:网络
I am getting errors like Undefined variable from import: BOLD while I do: import wx print(wx.BOLD) I looked at wx module initialization and it does something like

I am getting errors like Undefined variable from import: BOLD while I do:

import wx
print(wx.BOLD)

I looked at wx module initialization and it does something like

from wx._core import *
del wx

import wx._core

I am not sure why it does this trick, but it'开发者_JAVA百科s clear that this makes PyDev go insane.

What is the proper way of importing wx if you want to use wx.BOLD or other constants and not have PyDev complain about it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号