It kinda depends what your thread is doing, and what technique you are
using to keep it alive, but one possibility is to do something like:
class Worker(threading.Thread):
def run(self):
self.running = True
while(self.running):
# do stuff
def stop(self):
Hi all,
my question is probably about the threads... I have two IPs
and i want to run web.py server for each IP in the same
time from one script file. I can run them in two command
boxes (and this works) but i want to do this from one ;-)
Maybe i can do this with 'threads' but how ? is there some
[EMAIL PROTECTED] wrote:
Hi all,
Hi!
my question is probably about the threads... I have two IPs
and i want to run web.py server for each IP in the same
time from one script file. I can run them in two command
boxes (and this works) but i want to do this from one ;-)
if you run two
Luke Paireepinart escribió:
if you run two instances of the python interpreter (like you're doing
when you start two command windows,)
they're executing in different threads, it's just that the threads are
OS level instead of application level.
Bear in mind that python threads have the GIL
Anil,
Can you please ask more useful questions?
You have already been pointed to the url which describes
how to ask good questions. Please read it!
/favicon.ico
i want to get the favicon.ico from the URL when a blog is added to
the aggregator
I have no idea what this means.
and then
Hi All,
I am just plannig to make a small
ftp server that would serv not a filesystem, but some kind of objects,
like stocks or assets.
In that case I can use my favorite
commander to delete, copy, move objects from one place to another.
Have you got any idea which module
to use ?
Yours
[EMAIL PROTECTED] wrote:
Hi all,
my question is probably about the threads... I have two IPs
and i want to run web.py server for each IP in the same
time from one script file. I can run them in two command
boxes (and this works) but i want to do this from one ;-)
Maybe i can do this with
i want to get the favicon.ico from the URL when a blog is added to
the aggregator
I have no idea what this means.
Anil is referring to an icon image file that's often associated with web
sites:
http://en.wikipedia.org/wiki/Favicon
The Python Imaging Library (PIL) should be able to
Hi!
Hi !
I don't know what web.py is.
Is it something you wrote?
no, this is a simple webserver, (http://webpy.org/)
You'll have to write multi-threaded code if you want it
to run multiple
threads :)
(Unless, of course, Web.py supports threads?)
i will ask the authors about this ...
yes - i will ask the webpy authors
but i expected to fond out a way to start two (or more)
scripts (web.py) in different threads from one puthon's
scrypt. OR two pythons interpretators to execute the above
scrypt ?
Python is a programming language. It's not a question about whether it's
i want to get the favicon.ico from the URL when a blog is added to
the aggregator
I have no idea what this means.
Anil is referring to an icon image file that's often associated with
web sites:
http://en.wikipedia.org/wiki/Favicon
Sure, that much I understood, but which url, and
On Tue, 15 Aug 2006, Jeff Peery wrote:
hello, how do I stop a thread?
In all the threaded apps I have so far, I've worked with Queues to give
them work. So my technique has been to put a special-purpose element on
the Queue, which is recognized by the thread, which exits.
I usually have
Message: 11
Date: Tue, 15 Aug 2006 11:50:47 +1200
From: John Fouhy [EMAIL PROTECTED]
Subject: Re: [Tutor] Global variables
Cc: tutor@python.org
Can you post actual code to illustrate the problem? Don't post your
entire module; just show us the functions involved, the input that
causes the
From: Bob Gailer
Date: 08/14/06 20:24:00
To: [EMAIL PROTECTED]; tutor@python.org
Subject: RE: [Tutor] Global variables
A while back you attached factor34.py. Is that the program you are
having trouble with?
Yes!
And you said it misbehaves consistently with certain numbers
From: Alan Gauld
Date: 08/15/06 03:37:21
To: Kermit Rose; [EMAIL PROTECTED]
Cc: tutor@python.org; [EMAIL PROTECTED]
Subject: Re: [Tutor] Global variables
.
The names have very little to do with it, the danger of global
variable
use is the reliance on side-effects and the tight
hello is there a way if a condition is not met to restart the whole
program? for example if and if statement returns true then re start the
whole program?
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
16 matches
Mail list logo