<s> from twisted . internet import reactor <EOL> from twisted . python import log <EOL> from twisted . application import service <EOL> from twisted . conch import manhole_tap <EOL> from roost import events , services <EOL> from roost . services import xbee , humidity_sensor , web , pushover , doorbell <EOL> def telnet_service ( user_file ) : <EOL> import roost <EOL> namespace = { '<STR_LIT>' : roost , '<STR_LIT>' : roost . find_service ( '<STR_LIT>' ) } <EOL> shell_options = { <EOL> '<STR_LIT>' : namespace , <EOL> '<STR_LIT>' : user_file , <EOL> '<STR_LIT>' : None , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> return manhole_tap . makeService ( shell_options ) <EOL> def makeService ( config ) : <EOL> log . msg ( "<STR_LIT>" ) <EOL> top_service = service . MultiService ( ) <EOL> services . start ( top_service , config ) <EOL> if config . has_key ( '<STR_LIT>' ) : <EOL> telnet_service ( config [ '<STR_LIT>' ] ) . setServiceParent ( top_service ) <EOL> return top_service </s>
