Re: [Tutor] [Fwd: Re: Find files without __doc__ strings]

2009-05-18 Thread Lie Ryan
David wrote: Subject: Re: [Tutor] Find files without __doc__ strings From: David Date: Mon, 18 May 2009 14:02:38 -0400 CC: tutor@python.org Lie Ryan wrote: David wrote: spir wrote: Le Sat, 16 May 2009 21:46:02 -0400

Re: [Tutor] Replacement for __del__

2009-05-18 Thread wesley chun
> I've been told numerous times that using __del__ is not the way to handle > clean-up because it is finicky. matthew, welcome to Python and this Tutor mailing list! and yes, i'll echo everyone else in saqying that using __del__ should be avoided. the most critical issues regarding this is becau

Re: [Tutor] Replacement for __del__

2009-05-18 Thread Alan Gauld
"Strax-Haber, Matthew (LARC-D320)" wrote My class sub-types dict. In __init__, there is a call to self.update(pickle.load()). For some reason, this triggers __del__. Why? A pure guess, but maybe the pickle load creates a new instance which replaces the original which then gets garbage col

[Tutor] Replacement for __del__

2009-05-18 Thread Strax-Haber, Matthew (LARC-D320)
To all the generous Python coders on this list, I've been told numerous times that using __del__ is not the way to handle clean-up because it is finicky. Fine. However, how should I handle the following problem: A folder is created during object instantiation. This is necessary because multiple ot

Re: [Tutor] performance loss -- profiling

2009-05-18 Thread Alan Gauld
"spir" wrote Also, it's the first time I really have to cope with machine-time; so I'm totally new to technics like using a profiler. Any hints on the topics heartfully welcome :-) Profilers are a bit like debuggers. Very useful when needed but usually a point of last resort. First, what

Re: [Tutor] Find files without __doc__ strings

2009-05-18 Thread David
Lie Ryan wrote: > David wrote: >> spir wrote: >>> Le Sat, 16 May 2009 21:46:02 -0400, >>> David s'exprima ainsi: >>> I am doing an exercise in Wesley Chun's book. Find files in the standard library modules that have doc strings. Then find the ones that don't, "the shame list". I c

[Tutor] performance loss -- profiling

2009-05-18 Thread spir
Hello, I have an big performance problem with an app I'm currently working on. It "suddenly" runs at least 5 times slower that it used to. The issue is, beeing in a finalization phase, I'm all the time touching thingies here and there. But performance change is visible only when running on big t

[Tutor] [Fwd: Re: Find files without __doc__ strings]

2009-05-18 Thread David
-- powered by Gentoo/GNU Linux http://linuxcrazy.com --- Begin Message --- Lie Ryan wrote: > David wrote: >> spir wrote: >>> Le Sat, 16 May 2009 21:46:02 -0400, >>> David s'exprima ainsi: >>> I am doing an exercise in Wesley Chun's book. Find files in the standard library modules th

Re: [Tutor] reading nested folders in gzip files

2009-05-18 Thread Kent Johnson
On Mon, May 18, 2009 at 12:34 PM, Dinesh B Vadhia wrote: > The structure of the gzip files are: > > gzip archive > folderA > folderB > list of folderC's > each folderC contains the target files > > Within the archive, I want to open the gzip archive, open fo

[Tutor] reading nested folders in gzip files

2009-05-18 Thread Dinesh B Vadhia
The structure of the gzip files are: gzip archive folderA folderB list of folderC's each folderC contains the target files Within the archive, I want to open the gzip archive, open folderA, openFolderB , get the list of target files in folderC, and extract

Re: [Tutor] Shared FIFO?

2009-05-18 Thread Allen Fowler
> "Allen Fowler" wrote > > I have several CGI scripts that I would like coordinate via a "First In / > First Out" style buffer.That is, some processes are adding work units, > and > some take the oldest and start work on them. > > > > What is the right way to do this?I suppose I cou

Re: [Tutor] Find files without __doc__ strings

2009-05-18 Thread Lie Ryan
David wrote: spir wrote: Le Sat, 16 May 2009 21:46:02 -0400, David s'exprima ainsi: I am doing an exercise in Wesley Chun's book. Find files in the standard library modules that have doc strings. Then find the ones that don't, "the shame list". I came up with this to find the ones with;

Re: [Tutor] Python popen command using cat > textfile .... how toterminate

2009-05-18 Thread Lie Ryan
Alan Gauld wrote: "MK" wrote Seems that i did it the wrong way still from the beginning. I did it now with open and write an empty file. But anyway i would wish to know if it is possible to terminate a running cat. It depends on what you mean by a running cat. Of course it meant "a runn

Re: [Tutor] Shared FIFO?

2009-05-18 Thread Kent Johnson
On Sun, May 17, 2009 at 11:36 PM, Allen Fowler wrote: > > Hello, > > I have several CGI scripts that I would like coordinate via a "First In / > First Out" style buffer.    That is, some processes are adding work units, > and some take the oldest and start work on them. > > What is the right way

Re: [Tutor] Shared FIFO?

2009-05-18 Thread spir
Le Mon, 18 May 2009 08:19:21 +0100, "Alan Gauld" s'exprima ainsi: > If > you never, or rarely, have concurrent accesses then using > a text file might work. That's what I would do. New tasks appended --> oldest one = first one (first line, probably). For access sharing, then you can have a v

Re: [Tutor] Shared FIFO?

2009-05-18 Thread Alan Gauld
"Allen Fowler" wrote I have several CGI scripts that I would like coordinate via a "First In / First Out" style buffer.That is, some processes are adding work units, and some take the oldest and start work on them. What is the right way to do this? I suppose I could use an SQL ser