hikyuu2/docs/examples/examples_init.py
2019-02-17 16:10:03 +08:00

29 lines
819 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/python
# -*- coding: utf8 -*-
# cp936
#===============================================================================
# 作者fasiondog
# 历史120130128, Added by fasiondog
#===============================================================================
from hikyuu import *
import os
curdir = os.path.dirname(os.path.realpath(__file__))
head, tail = os.path.split(curdir)
head, tail = os.path.split(head)
head, tail = os.path.split(head)
import sys
if sys.platform == 'win32':
config_file = os.path.join(head, "test/data/hikyuu_win.ini")
else:
config_file = os.path.join(head, "test/data/hikyuu_linux.ini")
#starttime = time.time()
#print "Loading Day Data ..."
hikyuu_init(config_file)
sm = StockManager.instance()
#endtime = time.time()
#print "%.2fs" % (endtime-starttime)