• 大小: 475KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-06
  • 语言: Python
  • 标签: python  S19  

资源简介

使用Python处理S19文件,分析S19文件中的数据。能够很好地帮助分析S19文件

资源截图

代码片段和文件信息

#S19 File Analysis
#By Quito M.
#This is a small module which can be used to analyze the structure of
#an S19 file for personal study and reference.

###############
# Functions
###############

#Returns a count for records of the S[N] type where N is any number from 0 through 9.

def s_count(record_list N):
    c=0 #count var initalized at 0
    r=record_list  #local var for the list of records
    l=len(r)  #length of the record list (the S19 file)
    s= “S“+str(N) #Depending on value of N a string equal to S0 S1 .. S8 or S9
    for i in range(0 l-1): #iterates for each member of the list
        t= s in r[i] #Is S[N] found in the current row? True if yes False if no.
        if t==True:
            c+=1  #increment by 1 for each record of S[N] found
    return c

#

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-03-27 05:10  S19-master\
     文件           6  2015-03-27 05:10  S19-master\README.md
     文件        4090  2015-03-27 05:10  S19-master\S19.py
     文件      595376  2015-03-27 05:10  S19-master\S19_Chart.png
     文件         404  2015-03-27 05:10  S19-master\Test.s19

评论

共有 条评论