This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tornado.web import StaticFileHandler | |
class ExtensionlessStaticFileHandler(StaticFileHandler): | |
""" | |
A static file handler which serves static content from a directory. | |
In addition to the behavior of the default StaticFileHandler, | |
provision is made to serve extensionless files. For example, | |
if ``default_extension`` is set to ``.html`` and the url | |
``foo/bar`` is requested, the file `foo/bar.html`` will be |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
import markdown | |
class MarkdownSyntaxError(AssertionError): | |
pass | |
# The test suite to which all syntax tests are added. | |
test_syntax = unittest.suite.TestSuite() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
class Node(object): | |
""" | |
Markdown Abstract Syntax Tree Node. | |
Each instance represents one node of a Markdown abstract syntax tree | |
node. Each can be encoded to JSON and a tree can be decoded from JSON. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from threading import Timer | |
def now(): | |
""" Return the current time in seconds since the epoch. """ | |
return int(time.time()) | |
class Countdown(object): |
This table:
|Test1|Test2|
|-------------|-------------|
|Hello|`a_very_very_very_long_variable_name=some_very_very_very_long_namepsace.with_a_very_very_very_long_function_name(and_a_very_very_very_long_keyword="some very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long value")`|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static | |
from os import path | |
class ExtensionlessCling(static.Cling): | |
""" | |
Serve static extensionless files. | |
Serve static files just like static.Cling with the added | |
ability to serve a file without its file extension. For | |
example, a request for ``/foo/bar`` would serve the file |
Still on the left!!!
Column1 | Column1 | Column1 |
---|---|---|
Column1 | Column1 | Column1 |