コード例 #1
0
 def test_fonts(self):
     text = "Hello Robbie!"
     self.assertEqual(cgitb.small(text), "<small>{}</small>".format(text))
     self.assertEqual(cgitb.strong(text),
                      "<strong>{}</strong>".format(text))
     self.assertEqual(cgitb.grey(text),
                      '<font color="#909090">{}</font>'.format(text))
コード例 #2
0
 def test_blanks(self):
     self.assertEqual(cgitb.small(""), "")
     self.assertEqual(cgitb.strong(""), "")
     self.assertEqual(cgitb.grey(""), "")
コード例 #3
0
ファイル: test_cgitb.py プロジェクト: 0jpq0/kbengine
 def test_fonts(self):
     text = "Hello Robbie!"
     self.assertEqual(cgitb.small(text), "<small>{}</small>".format(text))
     self.assertEqual(cgitb.strong(text), "<strong>{}</strong>".format(text))
     self.assertEqual(cgitb.grey(text),
                      '<font color="#909090">{}</font>'.format(text))
コード例 #4
0
ファイル: test_cgitb.py プロジェクト: 0jpq0/kbengine
 def test_blanks(self):
     self.assertEqual(cgitb.small(""), "")
     self.assertEqual(cgitb.strong(""), "")
     self.assertEqual(cgitb.grey(""), "")
コード例 #5
0
 def test_blanks(self):
     self.assertEqual(cgitb.small(''), '')
     self.assertEqual(cgitb.strong(''), '')
     self.assertEqual(cgitb.grey(''), '')
コード例 #6
0
    # text(default_cell_number, 'jobTitle.text')  # break # elif "Jr" in jobTitle.text:
    # print(type(matches)) for match in matches: print(match.text.strip())
    # text(default_cell_number, 'jobTitle.text')  # break


def main():
    db_print(f"{DEFAULT_PARSER}")
    wps = WebPageSet([], check_links=True, maxlen=100)
    wps.append(WebPage('https://www.google.com'))
    wps.append(WebPage('fake page'))
    wps.append('fake page')


if __name__ == "__main__":
    cgitb.enable()
    db_print(cgitb.grey('test grey font'))
    try:
        app.run()
    except:
        pass

    # start_response('200 OK', [('Content-Type', 'text/html')])
    main()

# References
""" Choice of parser

    I use BeautifulSoup to work with html documents.

        Beautiful Soup is a Python library for pulling data out of HTML and XML files. It works with your favorite parser to provide idiomatic ways of navigating, searching, and modifying the parse tree. It commonly saves programmers hours or days of work.
コード例 #7
0
ファイル: nodes.py プロジェクト: xxoolm/Ryven
 def update_event(self, inp=-1):
     self.set_output_val(0, cgitb.grey(self.input(0)))