Module About
[hide private]
[frames] | no frames]

Source Code for Module About

 1  # -*- coding: iso-8859-1 -*- 
 2   
 3  """The About window for the gui.""" 
 4   
 5   
 6  import Tkinter 
 7   
 8  #: Global variable which stores a reference to an existing top-level window 
 9  _SingleInstance = None 
10   
11 -def Open():
12 """Open as top-level window.""" 13 global _SingleInstance 14 if _SingleInstance is None: 15 _SingleInstance = Tkinter.Toplevel() 16 _SingleInstance.title("About ...") 17 _SingleInstance.bind("<Destroy>", _set_None) 18 _Window(_SingleInstance) 19 else: 20 _SingleInstance.deiconify()
21
22 -def Close():
23 """Close top-level window.""" 24 global _SingleInstance 25 if _SingleInstance is not None: 26 _SingleInstance.destroy()
27
28 -def _set_None(e=None):
29 """If used as top-level window, this is called at "destroy" 30 and sets our global variable to None.""" 31 global _SingleInstance 32 _SingleInstance = None
33 34
35 -class _Window(object):
36 """'About' window of application.""" 37
38 - def __init__(self,root):
39 self.root = root 40 w = Tkinter.Label(self.root,text= 41 """ 42 This is a demo application for the PyFuzzy package. 43 44 It simulates an inverted pendulum which can be controlled 45 by a fuzzy controller or a trained neural network trained from the fuzzy controller. 46 47 Author: Rene Liebscher <R.Liebscher@gmx.de> 48 """) 49 w.pack()
50