[Tutor] Subprocess.Popen process seems to be outputting to stdout even though redirected ?

2012-06-10 Thread dave selby
I have a simple script to tail a log file for an error string, it works AOK but there is an unexpected side effect, when I run it in a shell. if I echo "ERROR TEST" >> LOG in a separate shell, I get the following from the script ERROR TEST GOT YA :) ERROR TEST So it looks like I am getting std

Re: [Tutor] Subprocess.Popen process seems to be outputting to stdout even though redirected ?

2012-06-10 Thread dave selby
This list is amazing, I scratch my head, think and think then finally post a question, maybe its the act of spelling it out, ps ax showed 2 x 'tail' processes, I am guessing zombies of previous attempts, killed them, all works AOK now On 10 June 2012 10:06, dave selby wrote: > I have a simple sc

[Tutor] properties beginner M Dawson book

2012-06-10 Thread Nicholas Harman
Hi, I am teaching myself Python with the book :Python Programming for the Absolute Beginner, 3rd edition by M Dawson. It is an excellent book and I am enjoying completing the challenges at the end of each chapter. There are, unfortunately, no answers nor examples of good and bad code. Honestl

Re: [Tutor] properties beginner M Dawson book

2012-06-10 Thread Steven D'Aprano
Nicholas Harman wrote: I have done a little programming in BlueJ Java before but I decided to try the “Python style” as explained in the chapter, using properties rather than variables and getters and setters . My main question is: When using property and setter it seems I must use “__name”

Re: [Tutor] properties beginner M Dawson book

2012-06-10 Thread Steven D'Aprano
Nicholas Harman wrote: class Television(object): #Contstructor Spelling error: Constructor. Actually, technically __init__ is not the constructor. __init__ is the initializer, as the object has already been created before __init__ is called. __new__ is the constructor, although in this