class buttom:
def load_files(self):
dlg = wx.FileDialog(None,message="Choose File",wildcard= '*.txt;*.csv', defaultFile="",style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST|wx.FD_CHANGE_DIR)
if dlg.ShowModal() == wx.ID_CANCEL:
print ('buh cancelaste')
else:
filename=dlg.GetFilename()
f = open(filename)
#f = open('test1.csv', 'rb') # opens the csv file
try:
reader = csv.reader(f, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL, lineterminator='\n')
for column in reader: # iterates the rows of the file in orders
print (type(column))
print (column)
finally:
f.close() # closing
files = wx.Button(pan, label='Load Coordinates', pos=(x1+280,570), size = (150,40))
files.Bind(wx.EVT_BUTTON, load_files)
how can i do the my csv file, vpython can 3d simulate my coordinates values using a wxpython evtbutton.
example:
Asis = sphere(pos= (MYCOORDINATESVALUES), make_trail=True, radius = 0.02, color=color.blue, retain= 200)