# log.level=log.debug
    # error_handler = SyslogHandler('Sina-M-Log', level='ERROR')

    if cct.isMac():
        cct.set_console(165, 16)
    else:
        cct.set_console(160, 15)
    status = False
    vol = '0'
    type = '2'
    # cut_num=10000
    success = 0
    top_all = pd.DataFrame()
    time_s = time.time()
    # delay_time = 3600
    delay_time = cct.get_delay_time()
    First = True
    base_path = tdd.get_tdx_dir()
    block_path = tdd.get_tdx_dir_blocknew() + '062.blk'
    status_change = False

    # all_diffpath = tdd.get_tdx_dir_blocknew() + '062.blk'
    while 1:
        try:
            # df = sina_data.Sina().all
            df = rl.get_sina_Market_json('all')
            top_now = rl.get_market_price_sina_dd_realTime(df, vol, type)
            # print top_now.loc['300208','name']
            # top_now.to_hdf("testhdf5", 'marketDD', format='table', complevel=9)
            df_count = len(df)
            now_count = len(top_now)
Exemple #2
0
 # log.setLevel(LoggerFactory.DEBUG)
 if cct.isMac():
     width, height = 174, 16
     cct.set_console(width, height)
 else:
     width, height = 174, 18
     cct.set_console(width, height)
 status = False
 vol = ct.json_countVol
 type = ct.json_countType
 # cut_num=10000
 success = 0
 top_all = pd.DataFrame()
 time_s = time.time()
 # delay_time = 3600
 delay_time = cct.get_delay_time()
 First = True
 # base_path = tdd.get_tdx_dir()
 # block_path = tdd.get_tdx_dir_blocknew() + '067.blk'
 # blkname = '067.blk'
 blkname = '063.blk'
 block_path = tdd.get_tdx_dir_blocknew() + blkname
 lastpTDX_DF = pd.DataFrame()
 duration_date = ct.duration_date_l
 end_date = cct.last_tddate(days=3)
 # all_diffpath = tdd.get_tdx_dir_blocknew() + '062.blk'
 market_sort_value = ct.Market_sort_idx['1']
 market_sort_value_key = eval(market_sort_value + '_key')
 while 1:
     try:
         # top_now = tdd.getSinaAlldf(market='sh', vol=ct.json_countVol, vtype=ct.json_countType)