Hi,
Is is possible to call a python file from within a script in Rhino? In short, I want to read a bunch of inputs from a csv into another function… for cleanliness sake was going to just call the other function from the script in the folder (within the csv function) instead of writing it all out. See below:
import csv
import rhinoscriptsyntax as rs
def CSVlist():
#prompt the user for a file to import
filter = "CSV file (*.csv)|*.csv|*.txt|All Files (*.*)|*.*||"
filename = rs.OpenFileName("Open Point File", filter)
if not filename: return
with open(filename) as csvfile:
reader = csv.reader(csvfile)
for row in reader:
x = str(row[0])
newfunction(x)
Thanks!