1234567891011121314151617181920212223242526272829303132 |
- # -*- coding:utf-8 -*-
- import os, sys, time
- from service.ccard_service import *
- from service.service_manager import *
- SManager = ServiceManager()
- def startCaptureCard():
- print u"视频采集卡"
- def startAllService():
- print u"启动所有服务"
- startCaptureCard()
- def startService(service_name):
- if (service_name == "all"):
- startAllService()
- elif (service_name == "ccard"):
- startCaptureCard()
- else:
- print u"未找到需要启动的设备服务:",service_name
- if __name__ == "__main__":
- print u"你输入的命令参数:", sys.argv
- if (sys.argv.__len__() < 3):
- print u"请输入正确的命令"
- exit(0)
- command = sys.argv[1]
- param = sys.argv[2]
- if "start" == command:
- startService(param)
|