Christoph Haas wrote:
> Dear coders...
>
> I'm working on an application that is supposed to support "plugins".
> The idea is to use the plugins as packages like this:
>
> Plugins/
> __init__.py
> Plugin1.py
> Plugin2.py
> Plugin3.py
>
> When the application starts up I want to have thes
On Sunday 25 September 2005 22:30, Victor Ng wrote:
> You could do it with a metaclass, but I think that's probably
> overkill.
OK. And thanks for the example :-). It looks simple enough... I didn't
think the solution would be overly complex. And the RLock makes it
easier than I anticipated - wa
On Sun, 25 Sep 2005 23:30:21 -0400, Victor Ng <[EMAIL PROTECTED]> wrote:
>You could do it with a metaclass, but I think that's probably overkill.
>
>It's not really efficient as it's doing test/set of an RLock all the
>time, but hey - you didn't ask for efficient. :)
There's a race condition in t
Hmmm well that's obvious enough. This is why I shouldn't write code off the cuff on c.l.p :)OTOH - if I just assign the RLock in the base classes initializer, is there any problem?vic
On 9/26/05, Jp Calderone <[EMAIL PROTECTED]> wrote:
On Sun, 25 Sep 2005 23:30:21 -0400, Victor Ng <[EMAIL
Mike Meyer wrote:
> This is a well-known phenomenon, having picked up the name "bikeshed"
> something like 40 years ago. Google for "bikeshed color".
My favourite "bikeshed" story:
A colleague just joined his local Primary School council. On the agenda
for his first meeting was that the shelte
Thank you Reinhold, that was the solution. But just because I am curious:
what is this statement without the parentheses? After all it is a valid
statement...
Rainer
In article <[EMAIL PROTECTED]>, Reinhold Birkenfeld wrote:
> Is the above exactly your code? If yes, it should be
>
> f.close()
Rainer Hubovsky wrote:
> Thank you Reinhold, that was the solution. But just because I am curious:
> what is this statement without the parentheses? After all it is a valid
> statement...
it's an expression that fetches the "close" method object, and throws
it away. to see what it evaluates to,
Roger Upole wrote:
> "Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> > Steven Bethard wrote:
> >
> >> > Using the following snippet:
> >> > p =
> >> > subprocess.Popen(nmake,stderr=subprocess.PIPE,stdout=subprocess.PIPE, \
> >> >universal_new
I wrote this one:
--
def load_plugin(self, plugin, paths):
import imp
# check if we haven't loaded it already
try:
return sys.modules[plugin]
except KeyError:
pass
# ok, the load it
fp, filen
101 - 109 of 109 matches
Mail list logo