Re: [Tutor] calling setters of superclasses

2010-12-18 Thread Peter Otten
Gregory, Matthew wrote: > Hi all, > > Consider the following classes where PositiveX should constrain the > attribute _x to be positive and SmallX should further constrain the > attribute _x to be less than 10. > > class PositiveX(object): > def __init__(self): > self._x = 1 > @p

[Tutor] why "ifconfig" is alway running?

2010-12-18 Thread lei yang
my script is #!/usr/bin/env python import datetime import subprocess import sys import os import signal from time import sleep def runForAWhile(cmd, secs=10): print("running %s" % cmd) timeout = datetime.timedelta(seconds=secs) print timeout proc = subprocess.Popen(cmd, stdout=subprocess.

Re: [Tutor] calling setters of superclasses

2010-12-18 Thread Hugo Arts
On Sat, Dec 18, 2010 at 11:06 AM, Peter Otten <__pete...@web.de> wrote: > > I don't think /how/ you are trying it is stupid though I'm not so sure about > /what/ . > > I didn't get it to work with super() either, so here's Plan B till someone > is going to enlighten both of us: > By no means a sol

Re: [Tutor] why "ifconfig" is alway running?

2010-12-18 Thread Alan Gauld
"lei yang" wrote def runForAWhile(cmd, secs=10): proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) status = proc.poll() start = datetime.datetime.now() while (status is None and (datetime.datetime.now() - start) < timeout):

[Tutor] looking for python or django SQL data editor

2010-12-18 Thread Len Conrad
phpmyadmin and other such mysql db design/maintain tools do too much, too complicated. I'm looking for a python or django web app that allows non-tech users to add/delete/search records. thanks Len ___ Tutor maillist - Tutor@python.org To unsubs

Re: [Tutor] looking for python or django SQL data editor

2010-12-18 Thread David Hutto
On Sat, Dec 18, 2010 at 7:45 PM, Len Conrad wrote: > phpmyadmin and other such mysql db design/maintain tools do too much, too > complicated. > > I'm looking for a python or django web app that allows non-tech users to > add/delete/search records. You'll probably find the same here. A bunch of

Re: [Tutor] The Template Pattern

2010-12-18 Thread Steven D'Aprano
Karim wrote: class InputStrategy( object ): """This InputStrategy class is an abstract interface to various read strategy objects. """ def read(self, filePath): """Abstract method to load into database memory an input file. @arg: filePath - string - The input file

[Tutor] Python using version 3.1

2010-12-18 Thread Lea Parker
Hello I am working through a purchased text book Python programming for beginners. Chapter two shows how to create a basic program using triple-quoted strings. I am having problems working out what I have done incorrectly. The game over block writing should stay on the same line but the bottom ha

Re: [Tutor] Python using version 3.1

2010-12-18 Thread Hugo Arts
On Sun, Dec 19, 2010 at 4:42 AM, Lea Parker wrote: > Hello > > I am working through a purchased text book Python programming for beginners. > Chapter two shows how to create a basic program using triple-quoted strings. > > I am having problems working out what I have done incorrectly. The game ove

Re: [Tutor] why "ifconfig" is alway running?

2010-12-18 Thread lei yang
#!/usr/bin/env python import datetime import subprocess import sys import os import signal from time import sleep def runForAWhile(cmd, secs=10): print("running %s" % cmd) timeout = datetime.timedelta(seconds=secs) print timeout proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,

Re: [Tutor] Python using version 3.1

2010-12-18 Thread wesley chun
On Sat, Dec 18, 2010 at 8:13 PM, Hugo Arts wrote: > On Sun, Dec 19, 2010 at 4:42 AM, Lea Parker wrote: >> I am having problems working out what I have done incorrectly. The game over >> block writing should stay on the same line but the bottom half of the word >> over comes up next to the top hal