Back to index

python3.2  3.2.2
Public Member Functions | Private Member Functions | Private Attributes
pynche.PyncheWidget.Helpwin Class Reference

List of all members.

Public Member Functions

def __init__
def deiconify

Private Member Functions

def __withdraw

Private Attributes

 __root
 __text

Detailed Description

Definition at line 202 of file PyncheWidget.py.


Constructor & Destructor Documentation

def pynche.PyncheWidget.Helpwin.__init__ (   self,
  master,
  quitfunc 
)

Definition at line 203 of file PyncheWidget.py.

00203 
00204     def __init__(self, master, quitfunc):
00205         from Main import docstring
00206         self.__root = root = Toplevel(master, class_='Pynche')
00207         root.protocol('WM_DELETE_WINDOW', self.__withdraw)
00208         root.title('Pynche Help Window')
00209         root.iconname('Pynche Help Window')
00210         root.bind('<Alt-q>', quitfunc)
00211         root.bind('<Alt-Q>', quitfunc)
00212         root.bind('<Alt-w>', self.__withdraw)
00213         root.bind('<Alt-W>', self.__withdraw)
00214 
00215         # more elaborate help is available in the README file
00216         readmefile = os.path.join(sys.path[0], 'README')
00217         try:
00218             fp = None
00219             try:
00220                 fp = open(readmefile)
00221                 contents = fp.read()
00222                 # wax the last page, it contains Emacs cruft
00223                 i = contents.rfind('\f')
00224                 if i > 0:
00225                     contents = contents[:i].rstrip()
00226             finally:
00227                 if fp:
00228                     fp.close()
00229         except IOError:
00230             sys.stderr.write("Couldn't open Pynche's README, "
00231                              'using docstring instead.\n')
00232             contents = docstring()
00233 
00234         self.__text = text = Text(root, relief=SUNKEN,
00235                                   width=80, height=24)
00236         self.__text.focus_set()
00237         text.insert(0.0, contents)
00238         scrollbar = Scrollbar(root)
00239         scrollbar.pack(fill=Y, side=RIGHT)
00240         text.pack(fill=BOTH, expand=YES)
00241         text.configure(yscrollcommand=(scrollbar, 'set'))
00242         scrollbar.configure(command=(text, 'yview'))

Here is the caller graph for this function:


Member Function Documentation

def pynche.PyncheWidget.Helpwin.__withdraw (   self,
  event = None 
) [private]

Definition at line 243 of file PyncheWidget.py.

00243 
00244     def __withdraw(self, event=None):
00245         self.__root.withdraw()

Definition at line 246 of file PyncheWidget.py.

00246 
00247     def deiconify(self):
00248         self.__root.deiconify()
00249 
00250 


Member Data Documentation

Definition at line 205 of file PyncheWidget.py.

Definition at line 233 of file PyncheWidget.py.


The documentation for this class was generated from the following file: