15 import logging, logging.config
30 print "./Server_Portfolio dictstock.txt / help "
31 print " default ./dictstock.txt"
36 logging.logProcesses = 0
40 logging.config.fileConfig(
'/home/michael/workspace_kepler/ServerPortfolio/trunk/ServerPortfolio/logging.conf')
42 logger = logging.getLogger(
'SP')
47 logger.debug(
"test debug")
48 logger.info(
"test info")
49 logger.error(
"test error")
56 print "fstock ", fstock
57 if ( fstock ==
"help" ) | ( fstock ==
"-h" ) | ( fstock ==
"-help") :
66 print "no argument, use default dictstocks.txt"
69 dict_stocks.get_stocks()
82 thq=AutoParser.Thread_Handle_Queue()
85 print "threading.enumerate() ", threading.enumerate()
105 SocketServer_Server.run_MyServer( HOST, PORT, thq)
113 print "AT THE END: enumerate thread ",threading.enumerate()
Container of all Stocks objects, it also reads the static stocks configuration file "dictstocks...
Global variables for configuration: paths, TCP ports and generic definitions.
Module for updating the dictionary of stocks using independent threads every TIMEPARSER sec...
Server of the application, wait for requests: provide data, force update, etc.
Define singleton class DictionaryStocks, act as the main container of Stocks objects.