Re: [Tutor] Suggestions Please

2014-10-06 Thread Martin A. Brown
Greetings Phillip, I am trying to decide if Python is the right toolset for me. It might be. That depends on you and also the environment in which you operate. I do a lot of data analytics. Over the years I have used a lot of SQL and VBA, but the data sources are getting bigger. Data s

Re: [Tutor] Suggestions Please

2014-10-06 Thread Dave Angel
Phillip Pugh Wrote in message: > I am trying to decide if Python is the right toolset for me. I do a lot of > data analytics. Over the years I have used a lot of SQL and VBA, but the data > sources are getting bigger. I am thinking Python may be what I need to use, > but I am in the early stage

Re: [Tutor] search/match file position q

2014-10-06 Thread Dave Angel
"Clayton Kirkwood" Wrote in message: > > haven’t been able to find an definitive answer You should make your question clearer. Are you asking what your code does, or what you should like it to do? Either way, you should start with some sample code, and refer to that in your questions. As it i

[Tutor] search/match file position q

2014-10-06 Thread Clayton Kirkwood
Howdy I haven't been able to find an definitive answer. I am looking through a file(stream:<), for several matching strings. Match definitively starts at the beginning of the stream. As I search, or match, do I start over at the beginning of the stream for each match or do I start at the end of th

[Tutor] Suggestions Please

2014-10-06 Thread Phillip Pugh
I am trying to decide if Python is the right toolset for me. I do a lot of data analytics. Over the years I have used a lot of SQL and VBA, but the data sources are getting bigger. I am thinking Python may be what I need to use, but I am in the early stages of getting to know Python. Can you po

Re: [Tutor] Scaling photos

2014-10-06 Thread Alan Gauld
On 06/10/14 23:08, Jan Erik Moström wrote: I want to write a small script that scales photos. I want the scaled photos to keep all meta data available in the originals. I also want to keep this python only and easily installed on linux and OS X machines. What library would you people recommend f

Re: [Tutor] Scaling photos

2014-10-06 Thread Danny Yoo
On Mon, Oct 6, 2014 at 3:08 PM, Jan Erik Moström wrote: > I want to write a small script that scales photos. I want the scaled > photos to keep all meta data available in the originals. I also want > to keep this python only and easily installed on linux and OS X > machines. > > What library would

[Tutor] Scaling photos

2014-10-06 Thread Jan Erik Moström
I want to write a small script that scales photos. I want the scaled photos to keep all meta data available in the originals. I also want to keep this python only and easily installed on linux and OS X machines. What library would you people recommend for doing this? - jem ___

[Tutor] Fwd: grave confusion

2014-10-06 Thread Danny Yoo
-- Forwarded message -- From: Danny Yoo Date: Mon, Oct 6, 2014 at 11:23 AM Subject: Re: [Tutor] grave confusion To: Clayton Kirkwood > Well the guide certainly doesn't suggest that the read is one character at a > time, it implies one line at a time. However, it's hard to argue

Re: [Tutor] grave confusion

2014-10-06 Thread Danny Yoo
Alan has pointed out that your loop here: for line_in in file.readline(): ... has a much different meaning that the one you intend. It means: "for every character in the first line of the file: ..." The reason is because "file.readline()" returns a line of your file as a string. A

[Tutor] Sqliute Row row factory

2014-10-06 Thread Alan Gauld
I just discovered the SQLite Row row_factory which as the docs say: - If returning a tuple doesn’t suffice and you want name-based access to columns, you should consider setting row_factory to the highly-optimized sqlite3.Row type. Row provides both index-based and case-insensitive name-ba

Re: [Tutor] grave confusion

2014-10-06 Thread Alan Gauld
On 06/10/14 11:48, Alan Gauld wrote: Mostly the fact that readline() reads a line() ... Oops, Got a bit over enamoured with the parentheses there. Should just be plain 'line' of course. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.flickr.com/photos/ala

Re: [Tutor] grave confusion

2014-10-06 Thread Alan Gauld
On 06/10/14 03:19, Clayton Kirkwood wrote: Here's my problem; my code snippet reads a file(presumably an _io.readline, I'll question this later), with the file.readline(). Nope, it reads a line from a file. That's quite a different thing. The output shows individual characters being read and

[Tutor] grave confusion

2014-10-06 Thread Clayton Kirkwood
Here's my problem; my code snippet reads a file(presumably an _io.readline, I'll question this later), with the file.readline(). The output shows individual characters being read and printed out followed by the "here" being printed. Also, see below. Source data file: html class="yui3-js-e