Hello All- I cut my teeth of Fortran95, and in the distant past rode the turtle, and while I enjoy the mind-bendy feeling of shifting my programming paradigm (and LOVE LOVE LOVE Python), I get sheepish when I feel I'm missing something basic.
So: I have a csv list of data, of the form: plot, utmN83_X, utmN83_Y, plot_radius_m Spring1,348545,3589235,13.2 etc. I built a nifty ClassGPSPoint(Xpos,Ypos,plotRadius,workPaths) that eats the X&Y positions, the plot radius, and previously instantiated object holding all of the appropriate paths definitions to access the LiDAR LAS files. I make a nice CSV reader with one line (did I mention I LOVE python?)... plotReader = csv.reader(open("N:\\GIS_Projects\\095_ForestMetrics\\7_Analyses\\FinalCylinders\\Plots.csv")) What I want to do is use the first entry in that row (row[0]) as the variable name for the instantiated class. I'd get an instantiated GPSPoint object called 'Spring1' that would yield all my methods and defined values (Spring1.pathLASfile, Spring1.perturbXY(), etc).... Hence, in pseudocode: for row in plotReader: row[0] = GPSPoint(row[1],row[2],18.3,workPaths) But that doesn't work. I'm probably missing something basic and profound, (I was trying to use global to track my paths until I got my mind around the passing the instantiated object thing, but whaddya gonna do? Sequential to OO is a big shift, you know?) Thanks ya'll - Daryl
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor