Grasshopper

algorithmic modeling for Rhino

i don't know but now i'm obsessed with Coding, and was trying to figure out to write my own CSV file read component in Python, cuz i need to relation two diferents dataset, and i figure out that for pure python there's a CSV model available but its not able to work in Iron Python  cuz its compiled in PythonC. 

reading on the Net i found a module write by Sebastien Lorion

http://www.ironpython.info/index.php/Reading_CSV_Files

wich can be imported to IronPython in rhino, but this module its suitable for ReadStrings not files in a path,  in the sample recommends to build your own text reader from a file to handle it to read a CSV file from a text file. 

can someone know any other CSV module for IronPython that work well with files. 

Thanks 

Views: 2131

Replies to This Discussion

From the Rhino Python Editor you can access examples for both reading and writing text files (EditPythonScript -> Help -> Samples -> ImportPoints/ExportPoints). These examples should also work with .CSV since they are essentially text files following a specific formatting (comma separated values). You could also consider implementing Excel reading/writing using either .NET or xlrd/xlwt. Happy coding :)

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service