Re: [Tutor] Yielding from a with block

2015-05-27 Thread Steven D'Aprano
On Wed, May 27, 2015 at 11:27:46PM +0100, Oscar Benjamin wrote: > I'm just wondering what other people think about this. Should code > like make_lines below be discouraged? > > > def make_lines(): > > with open('co2-sample.csv') as co2: > > yield htbegin > > for linelist in cs

Re: [Tutor] How to close a Tkinter window from a different thread?

2015-05-27 Thread Cameron Simpson
On 27May2015 16:42, boB Stepp wrote: Python 2.4.4, Solaris 10 I realize that this is a bit old, but I got severely sidetracked! ~(:>) [...] On Mon, Apr 20, 2015 at 2:10 AM, Alan Gauld wrote: I would suggest forgetting about windows and think about the processes that create them. Use the OS t

Re: [Tutor] Yielding from a with block

2015-05-27 Thread Cameron Simpson
On 27May2015 23:27, Oscar Benjamin wrote: On 23 May 2015 at 10:52, Peter Otten <__pete...@web.de> wrote: import csv I'm just wondering what other people think about this. Should code like make_lines below be discouraged? In my opinion, no. def make_lines(): with open('co2-sample.csv')

[Tutor] Yielding from a with block

2015-05-27 Thread Oscar Benjamin
On 23 May 2015 at 10:52, Peter Otten <__pete...@web.de> wrote: > import csv > > I'm just wondering what other people think about this. Should code like make_lines below be discouraged? > def make_lines(): > with open('co2-sample.csv') as co2: > yield htbegin > for linelist in

Re: [Tutor] How to close a Tkinter window from a different thread?

2015-05-27 Thread boB Stepp
Python 2.4.4, Solaris 10 I realize that this is a bit old, but I got severely sidetracked! ~(:>) On Mon, Apr 20, 2015 at 2:10 AM, Alan Gauld wrote: > I would suggest forgetting about windows and think about > the processes that create them. Use the OS tools (via > the os module) to see if the

Re: [Tutor] Extracting data between strings

2015-05-27 Thread Laura Creighton
In a message of Wed, 27 May 2015 10:52:40 -0400, richard kappler writes: >Windows assumes you are an idiot…Linux demands proof. We're all rolling on the floor laughing from this one. Is it original with you? Thank you. Laura ___ Tutor maillist - Tu

Re: [Tutor] Extracting data between strings

2015-05-27 Thread Peter Otten
richard kappler wrote: > I'm writing a script that reads from an in-service log file in xml format > that can grow to a couple gigs in 24 hours, then gets zipped out and > restarts at zero. My script must check to see if new entries have been > made, find specific lines based on 2 different start

Re: [Tutor] Extracting data between strings

2015-05-27 Thread richard kappler
>Hi Richard, I'm not sure how advanced you are, whether you have any experience or if you're a total beginner. If anything I say below doesn't make sense, please ask! Keep your replies on the list, and somebody will be happy to answer. In between. I've been learning Python off and on as a hobby f

Re: [Tutor] Extracting data between strings

2015-05-27 Thread Steven D'Aprano
Hi Richard, I'm not sure how advanced you are, whether you have any experience or if you're a total beginner. If anything I say below doesn't make sense, please ask! Keep your replies on the list, and somebody will be happy to answer. On Wed, May 27, 2015 at 09:26:15AM -0400, richard kappler

[Tutor] Extracting data between strings

2015-05-27 Thread richard kappler
I'm writing a script that reads from an in-service log file in xml format that can grow to a couple gigs in 24 hours, then gets zipped out and restarts at zero. My script must check to see if new entries have been made, find specific lines based on 2 different start tags, and from those lines extra