<s> import asyncio <EOL> import pulsar <EOL> from pulsar . apps . wsgi import WSGIServer <EOL> from pulsar . apps . ds import pulsards_url <EOL> from web import TwitterSite <EOL> from twitter import Twitter , PublishTweets <EOL> class Server ( pulsar . MultiApp ) : <EOL> '''<STR_LIT>''' <EOL> cfg = { '<STR_LIT>' : pulsards_url ( ) } <EOL> @ asyncio . coroutine <EOL> def build ( self ) : <EOL> channel = '<STR_LIT>' % self . name <EOL> yield self . new_app ( WSGIServer , callable = TwitterSite ( channel ) ) <EOL> yield self . new_app ( Twitter , callable = PublishTweets ( channel ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> Server ( ) . start ( ) </s>
