On Fri, Jan 8, 2010 at 10:56 AM, Lowell Tackett wrote:
> Please keep in mind, as I'd mentioned earlier, all of this is fairly new
> concepts to me; from running an interpretive Python screen, to delving into
> the zen of computing, [even] to pasting stuff from there to here--there's
> about 4
On Fri, Jan 8, 2010 at 9:56 AM, Lowell Tackett wrote:
> and with all that I want to develop to where I can create some
> pretty expansive scripts dealing with land surveying stuff--manipulating
> coordinates, inversing, traversing, bearings, etc., etc.
>
Maybe you could even get into drawing the
>From the virtual desk of Lowell Tackett
--- On Fri, 1/8/10, Kent Johnson wrote:
> From: Kent Johnson
> Subject: Re: [Tutor] manipulting CSV files
> To: "Lowell Tackett"
> Cc: "tutor"
> Date: Friday, January 8, 2010, 10:07 AM
>
> Well, it
On Fri, Jan 8, 2010 at 9:54 AM, Lowell Tackett wrote:
> Now, perhaps you can you shed some light on this problem--I'm trying to do
> some simple arithmetic with two of the retrieved values, and get this error:
>
coord = csv.reader(open('true_coord', 'rb'), skipinitialspace = True)
for
>From the virtual desk of Lowell Tackett
--- On Fri, 1/8/10, Kent Johnson wrote:
> From: Kent Johnson
> Subject: Re: [Tutor] manipulting CSV files
> To: "Lowell Tackett"
> Cc: "tutor"
> Date: Friday, January 8, 2010, 8:11 AM
> On Thu, Jan 7, 2
On Thu, Jan 7, 2010 at 1:26 PM, Lowell Tackett wrote:
> I found the Python documentation (on line} and came
> across--'csv.Dialect.skipinitialspace' which I believe is the answer to my
> dilemma. However, my effort to implement that detail, based on interpreting
> the skimpy examples in the do
"Lowell Tackett" wrote
until I ran across the csv module. Had accomplished this:
coord = csv.reader(open('true_coord'))
for line in coord:
print line
[' 1001', ' 342821.71900', ' 679492.08300', ' 0.0', ' ']
[' 1002', ' 342838.55786', ' 679909.81375', ' 0.0', ' ']
when I
On 1/7/2010 10:26 AM Lowell Tackett said...
I suspect using csv is overkill, but you'd need to be working with
Dialects by first creating a Dialect, then applying the Dialect to your
source data.
I've not done that, and for your use case, I think I'd do something like:
filedata = '''1001, 342
Displayed below is an extract from a CSV file that displays some [land
surveying] coordinates:
1001, 342821.71900, 679492.08300, 0.0,
1002, 342838.55786, 679909.81375, 0.0,
1003, 342965.61860, 679911.34762, 0.0,
1004, 343012.82497, 680338.36624, 0.0,
1005, 3427