polarUtilsCmd.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:flamingo 作者: oddtopus 项目源码 文件源码
def getFromFile():
  '''Input polar coord. from .csv: returns a list of (x,y,0).
  The file must be ";" separated: column A = radius, column B = angle'''
  from PySide import QtGui
  fileIn=open(QtGui.QFileDialog().getOpenFileName()[0],'r')
  lines=fileIn.readlines()
  fileIn.close()
  xyCoord=[]
  for line in lines:
    polarCoord=line.split(';')
    xyCoord.append(polar2xy(float(polarCoord[0]),float(polarCoord[1])*math.pi/180))
  return xyCoord
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号