Hello,

I've been developing a PyMOL plugin using Tkinter, and encountered an issue
with the slider (scale) widget and an associated variable leading way to a
segfault as the slider value is changed. Below is a segment of the code
I've minimized as much as reasonable while still giving the error. The time
it takes to segfault varies, but I haven't seen it take more than a few
seconds of moving the slider.

Python Code:

import Tkinter

import pymol

def __init_plugin__(self=None):

        pymol.plugins.addmenuitem('segfaulter', main)

def main():

        root = Tkinter.Toplevel(pymol.plugins.get_tk_root())

        var = Tkinter.DoubleVar()

        slider = Tkinter.Scale(root,variable=var)

        slider.grid()

        varCallback = var.trace_variable('w', lambda x,y,z:function(var))

def function(var):

        print(var)

Any ideas on what might be going on, or suggestions to eliminate the error?
Thank you very much!

Best Regards,
Berk
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to