(self, screenName=None, baseName=None, className='Tix')
| 207 | """Toplevel widget of Tix which represents mostly the main window |
| 208 | of an application. It has an associated Tcl interpreter.""" |
| 209 | def __init__(self, screenName=None, baseName=None, className='Tix'): |
| 210 | tkinter.Tk.__init__(self, screenName, baseName, className) |
| 211 | tixlib = os.environ.get('TIX_LIBRARY') |
| 212 | self.tk.eval('global auto_path; lappend auto_path [file dir [info nameof]]') |
| 213 | if tixlib is not None: |
| 214 | self.tk.eval('global auto_path; lappend auto_path {%s}' % tixlib) |
| 215 | self.tk.eval('global tcl_pkgPath; lappend tcl_pkgPath {%s}' % tixlib) |
| 216 | # Load Tix - this should work dynamically or statically |
| 217 | # If it's static, tcl/tix8.1/pkgIndex.tcl should have |
| 218 | # 'load {} Tix' |
| 219 | # If it's dynamic under Unix, tcl/tix8.1/pkgIndex.tcl should have |
| 220 | # 'load libtix8.1.8.3.so Tix' |
| 221 | self.tk.eval('package require Tix') |
| 222 | |
| 223 | def destroy(self): |
| 224 | # For safety, remove the delete_window binding before destroy |
no test coverage detected