當前位置: 首頁>>代碼示例>>Python>>正文


Python StatValues.computeValues方法代碼示例

本文整理匯總了Python中StatValues.computeValues方法的典型用法代碼示例。如果您正苦於以下問題:Python StatValues.computeValues方法的具體用法?Python StatValues.computeValues怎麽用?Python StatValues.computeValues使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在StatValues的用法示例。


在下文中一共展示了StatValues.computeValues方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: makeReport

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import computeValues [as 別名]
def makeReport(inputFileName, outputDir, projectDir):

    print '\n Processing input file ' + inputFileName, 'Time:', time.asctime()

    #try :
    # For each input file create a separate subfolder for all the related files
    [inputId, subFolder] = CheckFolders.MakeSubfolder(inputFileName, outputDir)

    # Move the prefilled Tex files into the subfolder
    BuildTex.MoveFiles(subFolder, projectDir)  

    # Parse the input file  
    [graphData, statData] = ParseInput.dataFromFile(inputFileName, inputId, outputDir, subFolder)

    # Compute the statistics values and build the charts
    StatValues.computeValues(subFolder, statData)

    orgSize = len(statData)
    if orgSize < 8 :
        print '\nNo graph data!'
        BuildTex.SimplifyResult(subFolder)
    else :
        try :
            # Create graphs for the reports 
            graphObject = BuildGraphs.makeGraphObject(graphData)
            BuildGraphs.BuildAllGraphs(inputId, subFolder, graphObject)
        except Exception as e:
            print e.message

    # Create PDF
    if orgSize > 37 :
        BuildTex.insertTables(subFolder, orgSize)
        BuildTex.splitTables(subFolder, orgSize)
    BuildTex.CreatePdf(outputDir, subFolder, inputId, inputFileName)
開發者ID:ryavorsky,項目名稱:RPyAppl1,代碼行數:36,代碼來源:BuildAll.py

示例2: makeReport

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import computeValues [as 別名]
def makeReport(inputFileName, outputDir):

    print '\n Processing input file ' + inputFileName

    try :
        # For each input file create a separate subfolder for all the related files
        [inputId, subFolder] = CheckFolders.MakeSubfolder(inputFileName, outputDir)

        # Move the prefilled Tex files into the subfolder
        BuildTex.MoveFiles(subFolder)  

        # Parse the input file  
        [graphData, statData] = ParseInput.dataFromFile(inputFileName, inputId, outputDir, subFolder)

        # Compute the values  
        StatValues.computeValues(subFolder, statData)

        # Process the input data to create charts, graphs, Tex and then PDF
        # Create graphs for the reports 
        graphObject = BuildGraphs.makeGraphObject(graphData)
        BuildGraphs.BuildAllGraphs(inputId, subFolder, graphObject)

        # Create charts and histograms for the reports 
        BuildCharts.BuildAllCharts(subFolder, statData)

        # Create PDF
        BuildTex.CreatePdf(outputDir, subFolder, inputId, inputFileName)

    except Exception as e:
        print e.message
        print 'Creating PDF failed for ', inputId

    print '\n', '*'*70, '\n', '-'*70, '\n'
開發者ID:vlasova-evgeniya,項目名稱:RPyAppl1,代碼行數:35,代碼來源:BuildAll.py


注:本文中的StatValues.computeValues方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。