-
大小: 10KB文件類型: .zip金幣: 2下載: 1 次發(fā)布日期: 2021-06-17
- 語言: Python
- 標(biāo)簽:
資源簡介
csv2tex-將 csv 數(shù)據(jù)變成 LaTeX 表格

代碼片段和文件信息
#!/usr/bin/env?python3
import?configparser?as?cp
from?sys?import?argvexitstdoutstderr
from?numpy?import?genfromtxt
from?math?import?logfloor
from?getopt?import?gnu_getopt
################################################################################
#??????????????????????????????????????????????????????????????????????????????#
#????csv2tex.py????????????????????????????????????????????????????????????????#
#????Copyright?(C)?2015??Lucas?Luigi?Treffenst?dt?(lucas@treffenstaedt.de)?????#
#??????????????????????????????????????????????????????????????????????????????#
#????This?program?is?free?software;?you?can?redistribute?it?and/or?modify??????#
#????it?under?the?terms?of?the?GNU?General?Public?License?as?published?by??????#
#????the?Free?Software?Foundation;?either?version?2?of?the?License?or?????????#
#????(at?your?option)?any?later?version.???????????????????????????????????????#
#??????????????????????????????????????????????????????????????????????????????#
#????This?program?is?distributed?in?the?hope?that?it?will?be?useful???????????#
#????but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of????????????#
#????MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the?????????????#
#????GNU?General?Public?License?for?more?details.??????????????????????????????#
#??????????????????????????????????????????????????????????????????????????????#
#????You?should?have?received?a?copy?of?the?GNU?General?Public?License?along???#
#????with?this?program;?if?not?write?to?the?Free?Software?Foundation?Inc.???#
#????51?Franklin?Street?Fifth?Floor?Boston?MA?02110-1301?USA.???????????????#
#??????????????????????????????????????????????????????????????????????????????#
################################################################################
def?getColumn(config?section):
????if(“column“?in?config.options(section)):
????????return?int(config.get(section“column“))-1
????else:
????????print(“Error:?no?column?defined?for?“+section)
????????exit(1)
def?getError(config?section):
????if(“error“?in?config.options(section)):
????????return?int(config.get(section“error“))-1
????else:
????????return?None
def?getAlignment(config?section):
????if(“alignment“?in?config.options(section)):
????????return?config.get(section“alignment“)
????else:
????????return?“c“
def?gettitle(config?section):
????if(“title“?in?config.options(section)):
????????return?config.get(section“title“)
????else:
????????return?section
def?getPrecision(config?section):
????if(“precision“?in?config.options(section)):
????????return?int(config.get(section“precision“))
????else:
????????return?None
def?getScale(config?section):
????if(“scale“?in?config.options(section)):
????????return?float(config.get(section“scale“))
????else:
????????return?1
def?getErrorScale(config?sectionscale):
????if(“error_scale“?in?config.options(section)):
????????return?float(config.get(section“error_scale“))
????else:
????????return?scale
def?printSmart(string?out
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-07-13?08:04??csv2tex-master\
?????文件???????15238??2015-07-13?08:04??csv2tex-master\LICENSE
?????文件????????3189??2015-07-13?08:04??csv2tex-master\README
?????文件????????6825??2015-07-13?08:04??csv2tex-master\csv2tex.py
?????文件?????????230??2015-07-13?08:04??csv2tex-master\example.conf
?????文件?????????427??2015-07-13?08:04??csv2tex-master\example.dat
評論
共有 條評論