Python 2.7.5 Windows 7
I am working pubsub into my current project so I just upgraded from wxPython
2.8.12.1 to the current 2.9.5. I am now getting this import error:
from wxPython.lib.dialogs import wxScrolledMessageDialog
ImportError: No module named wxPython.lib.dialogs
My 2.8 had a site-packages/wxPYthon/lib/dialogs as well as the
site-packages/wx/lib/dialogs, which is the only one I have in 2.9 and which
does not have wxScrolledMessageDialog:
from wx.lib.dialogs import wxScrolledMessageDialog
ImportError: cannot import name wxScrolledMessageDialog
I do not know if the site-packages/wxPython was part of the 2.8 or if it
came from something else I installed.
I use it in a function like this:
def InfoText(parent, message, caption='Information !'):
"""
Show scrollable message in a dialog box for specified parent frame.
Automatically destroys itself when closed.
"""
_parent = parent
if _parent is None:
_parent = AppSys.main_frame
dlg = wxScrolledMessageDialog(_parent, message, caption)
dlg.ShowModal()
···
-----
Done is better than perfect -
but it is not done if it is not right.
--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/wxPython-2-9-5-import-error-wxScrolledMessageDialog-tp5718846.html
Sent from the wxPython-users mailing list archive at Nabble.com.
As I know, wxPython is obsolete, user just wx. For your imports use:
import wx.lib.dialogs
from wx.lib.dialogs import ScrolledMessageDialog
Thank you Torsten. That worked. wxScrolledMessageDialog is now just
ScrolledMessageDialog in the wx.lib.dialogs.
···
On 10/7/2013 1:11 PM, Torsten wrote:
As I know, wxPython is obsolete, user just wx. For your
imports use:
import wx.lib.dialogs
from wx.lib.dialogs
import ScrolledMessageDialog
–
You received this message because you are subscribed to the Google
Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to .
For more options, visit .
wxpython-users+unsubscribe@googlegroups.com
https://groups.google.com/groups/opt_out
Werner,
I do not remember where I got that from. I am sure it was in the last 6 months or so, though. Before I posted to this group I had Googled it to see what to do and only found old posts about making it resizable. I checked my "wxPython in Action" and "wxPython 2.8 Cookbook" and they did not have it either.
···
On 10/7/2013 3:42 PM, werner wrote:
Hi,
On 07/10/2013 18:50, Fatal114QT wrote:
Python 2.7.5 Windows 7
I am working pubsub into my current project so I just upgraded from wxPython
2.8.12.1 to the current 2.9.5. I am now getting this import error:
from wxPython.lib.dialogs import wxScrolledMessageDialog
This was very very old way of doing imports, where did you come across this? If in the wiki it should be changed.
Werner