code: def __loaddate():
          ''' 載入檔案
              檔案依據 http://www.twse.com.tw/ch/trading/trading_days.php
          '''
          csv_path = os.path.join(os.path.dirname(__file__), 'opendate.csv')
          with open(csv_path) as csv_file:
              csv_data = csv.reader(csv_file)
              result = {}
              result['close'] = []
              result['open'] = []
              for i in csv_data:
                  if i[1] == '0':  # 0 = 休市
                      result['close'].append(datetime.strptime(i[0],
                                                               '%Y/%m/%d').date())
                  elif i[1] == '1':  # 1 = 開市
                      result['open'].append(datetime.strptime(i[0],
                                                              '%Y/%m/%d').date())
                  else:
                      pass
              return resulf __loaddate():
          ''' 載入檔案
              檔案依據 http://www.twse.com.tw/ch/trading/trading_days.php
          '''
          csv_path = os.path.join(os.path.dirname(__file__), 'opendate.csv')
          with open(csv_path) as csv_file:
              csv_data = csv.reader(csv_file)
              result = {}
              result['close'] = []
              result['open'] = []
              for i in csv_data:
                  if i[1] == '0':  # 0 = 休市
                      result['close'].append(datetime.strptime(i[0],
                                                               '%Y/%m/%d').date())
                  elif i[1] == '1':  # 1 = 開市
                      result['open'].append(datetime.strptime(i[0],
                                                              '%Y/%m/%d').date())
                  else:
                      pass
              return result
docs: 載入檔案
              檔案依據 http://www.twse.com.tw/ch/trading/trading_days.php