SourceForge logo
SourceForge logo
Menu

pymol-users

From: <rv...@li...> - 2011年01月24日 22:11:16
Hi to all,
I need to open a message box dialog inside a pyMOL plug-in.
When I try the code:
import tkMessageBox
tkMessageBox.showinfo(‘title’, ‘msg’)
pyMOL crashes (the window doesn’t appear and pyMOL blocks).
I am just entering pyMOL and python. I never used Tkinter before.
Could anyone help me?
Thanks
From: Jason V. <jas...@sc...> - 2011年01月29日 13:15:10
Hi,
Just calling tkMessagebox like that causes a Tcl error which confuses
PyMOL, causing the crash. Try this code instead:
# begin Python block
python
import tkMessageBox
tkMessageBox.showinfo("title", "msg")
# end python block of code
python end
This wraps the code as one block and sends it to the Python interpreter.
Cheers,
-- Jason
On Mon, Jan 24, 2011 at 5:11 PM, rv...@li... <rv...@li...> wrote:
> Hi to all,
> I need to open a message box dialog inside a pyMOL plug-in.
>
> When I try the code:
>
> import tkMessageBox
> tkMessageBox.showinfo(‘title’, ‘msg’)
>
> pyMOL crashes (the window doesn’t appear and pyMOL blocks).
>
> I am just entering pyMOL and python. I never used Tkinter before.
>
> Could anyone help me?
> Thanks
>
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a 49ドル USD value)!
> Finally, a world-class log management solution at an even better price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> PyMOL-users mailing list (PyM...@li...)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pym...@li...
-- 
Jason Vertrees, PhD
PyMOL Product Manager
Schrodinger, LLC
(e) Jas...@sc...
(o) +1 (603) 374-7120
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /