Frank Millman wrote:
I have subclassed threading.Thread, and I store a number of attributes
within the subclass that are local to the thread. It seems to work
fine, but according to what you say (and according to the Python docs,
otherwise why would there be a 'Local' class) there must be some
Daniel Dittmar wrote:
Frank Millman wrote:
I have subclassed threading.Thread, and I store a number of attributes
within the subclass that are local to the thread. It seems to work
fine, but according to what you say (and according to the Python docs,
otherwise why would there be a
Hey people
I'm an experience PHP programmer who's been writing python for a couple of
weeks now. I'm writing quite a large application which I've decided to
break down in to lots of modules (replacement for PHP's include()
statement).
My problem is, in PHP if you open a database connection it's
Robin Haswell [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hey people
I'm an experience PHP programmer who's been writing python for a couple of
weeks now. I'm writing quite a large application which I've decided to
break down in to lots of modules (replacement for PHP's
On Thu, 19 Jan 2006 12:23:12 +, Paul McGuire wrote:
Robin Haswell [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hey people
I'm an experience PHP programmer who's been writing python for a couple of
weeks now. I'm writing quite a large application which I've decided to
break
Robin Haswell wrote:
cursor for every class instance. This application runs in a very simple
threaded socket server - every time a new thread is created, we create a
new db.cursor (m = getattr(modules, module)\n m.c = db.cursor() is the
first part of the thread), and when the thread finishes
On Thu, 19 Jan 2006 14:37:34 +0100, Daniel Dittmar wrote:
Robin Haswell wrote:
cursor for every class instance. This application runs in a very simple
threaded socket server - every time a new thread is created, we create a
new db.cursor (m = getattr(modules, module)\n m.c = db.cursor() is
Robin Haswell wrote:
Hey people
I'm an experience PHP programmer who's been writing python for a couple of
weeks now. I'm writing quite a large application which I've decided to
break down in to lots of modules (replacement for PHP's include()
statement).
My problem is, in PHP if you open
Robin Haswell wrote:
On Thu, 19 Jan 2006 14:37:34 +0100, Daniel Dittmar wrote:
If you use a threading server, you can't put the connection object into
the module. Modules and hence module variables are shared across
threads. You could use thread local storage, but I think it's better to
pass
On Thu, 19 Jan 2006 15:43:58 +0100, Daniel Dittmar wrote:
Robin Haswell wrote:
On Thu, 19 Jan 2006 14:37:34 +0100, Daniel Dittmar wrote:
If you use a threading server, you can't put the connection object into
the module. Modules and hence module variables are shared across
threads. You could
On Thu, 19 Jan 2006 06:38:39 -0800, Frank Millman wrote:
Robin Haswell wrote:
Hey people
I'm an experience PHP programmer who's been writing python for a couple of
weeks now. I'm writing quite a large application which I've decided to
break down in to lots of modules (replacement for
Robin Haswell wrote:
Can anyone give me advice on making this all a bit more transparent? I
guess I really would like a method to bring all these files in to the same
scope to make everything seem to be all one application, even though
everything is broken up in to different files.
This is
Robin Haswell wrote:
Ah I see.. sounds interesting. Is it possible to make any module variable
local to a thread, if set within the current thread?
Not directly. The following class tries to simulate it (only in Python 2.4):
import threading
class ThreadLocalObject (threading.local):
Daniel Dittmar wrote:
Robin Haswell wrote:
Ah I see.. sounds interesting. Is it possible to make any module variable
local to a thread, if set within the current thread?
Not directly. The following class tries to simulate it (only in Python 2.4):
import threading
class
14 matches
Mail list logo