OSDN Git Service

make it to rec10 0.5.9.0
[rec10/rec10-git.git] / rec10 / trunk / src / rec10d.py
1 #!/usr/bin/python
2 # coding: UTF-8
3 # Rec10 TS Recording Tools
4 # Copyright (C) 2009 Yukikaze
5 import os
6 import timerec
7 import dbSQLite
8 import dbMySQL
9 import configreader
10 path=str(os.path.dirname(os.path.abspath(__file__)))+"/"
11 global rec10db
12 db=configreader.getdbpath("db")
13 if db=="MySQL":
14     dbn=configreader.getdbpath("mysql_dbname")
15     dbh=configreader.getdbpath("mysql_host")
16     dbu=configreader.getdbpath("mysql_user")
17     dbpwd=configreader.getdbpath("mysql_passwd")
18     dbport=int(configreader.getdbpath("mysql_port"))
19     rec10db=dbMySQL.DB_MySQL(dbname=dbn,host=dbh,user=dbu,passwd=dbpwd,port=dbport)
20 else:
21     rec10db=dbSQLite.DB_SQLite(path+"ch.db")
22 if __name__ == "__main__":
23     timerec.task()