Back to index

python-biopython  1.60
xbb_help.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # Created: Tue Sep  4 09:05:16 2001
00003 # Last changed: Time-stamp: <01/09/04 09:42:37 thomas>
00004 # thomas@cbs.dtu.dk, http://www.cbs.dtu.dk/thomas
00005 # File: xbb_help.py
00006 
00007 from Tkinter import *
00008 from ScrolledText import ScrolledText
00009 
00010 class xbbtools_help(Toplevel):
00011     def __init__(self, *args):
00012         Toplevel.__init__(self)
00013         self.tid = ScrolledText(self)
00014         self.tid.pack(fill = BOTH, expand = 1)
00015         self.Styles()
00016         self.Show()
00017 
00018     def Styles(self):
00019         for c in ['red', 'blue', 'magenta', 'yellow', 'green', 'red4', 'green4', 'blue4']:
00020             self.tid.tag_configure(c, foreground = c)
00021 
00022         self.tid.tag_config('underline', underline =1)
00023         self.tid.tag_config('italic', font = ('Courier', 6, 'italic'))
00024         self.tid.tag_config('bold', font = ('Courier', 8, 'bold'))
00025         self.tid.tag_config('title', font = ('Courier', 12, 'bold'))
00026         self.tid.tag_config('small', font = ('Courier', 6, ''))
00027         self.tid.tag_config('highlight', background = 'gray')
00028         
00029 
00030     def Show(self):
00031         t = self.tid
00032         t.insert(END, "XBBtools Help\n", 'title')
00033         t.insert(END, """
00034 Copyright 2001 by Thomas Sicheritz-Ponten.  All rights reserved.
00035 This code is part of the Biopython distribution and governed by its
00036 license.  Please see the LICENSE file that should have been included
00037 as part of this package.\n
00038 """, 'italic')
00039         t.insert(END, 'thomas@biopython.org\n\n', 'blue')
00040         t.insert(END, '* Goto Field\n', 'bold')
00041         t.insert(END, '\tinserting one position moves cursor to position\n')
00042         t.insert(END, "\tinserting two positions, sperated by ':' ")
00043         t.insert(END, 'highlights', 'highlight')
00044         t.insert(END, ' selected range\n')
00045         t.insert(END, '\n')
00046         t.insert(END, '* Search\n', 'bold')
00047         t.insert(END, '\tambiguous dna values are\n')
00048         t.insert(END, """
00049                 A: A
00050                 C: C
00051                 G: G
00052                 T: T
00053                 M: AC
00054                 R: AG
00055                 W: AT
00056                 S: CG
00057                 Y: CT
00058                 K: GT
00059                 V: ACG
00060                 H: ACT
00061                 D: AGT
00062                 B: CGT
00063                 X: GATC
00064                 N: GATC
00065 
00066                 """, 'small')
00067 
00068