Exemple #1
0
	
	try:
		pms_bin = os.path.join(apkscan_path,'pms_statistic.py')
		if not os.path.exists(pms_bin):
			err_msg = "pms_statistic file is not exists in path[%s]" %apkscan_path
			#logger.error(err_msg)
			return err_msg
		if True == os.path.isdir(src):
			cmd = 'python %s -p "%s"' %(pms_bin, src)
			print "This is a score for 'a path' that includes many apps"
		else:
			cmd = 'python %s -a "%s"' %(pms_bin, src)
			print "This is a score for 'single app'"
		
		process = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE, stdin=PIPE, close_fds=False)
		out, err = process.communicate()
		if not async:
			process.wait()
		time.sleep(1)
		#ret = conf.pms_result_path
		ret = pms01_result_path
		#name = appname_path #record the name depends on the sequence of 01 file apps
		return ret
	except Exception,e:
		print e
	
	return ret

#----------------------------------------------------------------------
def loadDataSet_real(filePath): 
	"""