I’m trying to make a script for 2.5. This script needs to import a .csv, this is actually for a new type of file, and I’m having problems doing that. Namely, I heard there was already a Python module for importing .csv files. Can someone help me out? I’m dissecting the .obj import script for the rest of the code.
don’t know about a module, but you could just open a file, read a line and assign it to variables…
I don’t know how to call the “file dialog” (in 2.49 it was:
Blender.Window.FileSelector() but in 2.5 not sure!
if you know the path to the filr you can just open it direct:
infile = open('myfile.csv', 'r') # r means open as text
for line in infile:
line = infile.readline()
rowcells = line.split(',') #splits the string into a list using the ',' to make the cuts....