|
From: Benjamin R. <ben...@ou...> - 2012-09-06 00:15:47
|
On Wednesday, September 5, 2012, Mark Budde wrote: > Hi, > I'm not an expert so please go easy on me. I am using the pyplot lasso > demo, and have got it to work how I would like. I am having a problem, > however, where I cannot get it to work if my python file is not the > main file (where __name__ is not __main__). > > I took the part at the bottom in the "if __name__ == '__main__':" and > put it into a class. Everything works fine if I call the class from > within the same file. However, if I call the class from another file, > the graph loads fine but the lasso tool does not work. Troubleshooting > revealed that LassoManager.onpress is not being called when I click > the mouse. Any suggestions are welcome because this is driving me > crazy! > Thanks, > Mark I can assure you that it does work from a library because I have done that. Most likely it is some minor error in your code. Is it possible to post a simple example to demonstrate your problem? Ben Root |