On Thursday, January 23, 2020 at 3:54:56 AM UTC-5, Z wrote:
> what is PLR?
PLR: Private Label Rights (https://en.wikipedia.org/wiki/Private_label_rights)
--
https://mail.python.org/mailman/listinfo/python-list
On 24/01/2020 04:26, DL Neil via Python-list wrote:
Questions:
Have I made proper sense of this? (please don't laugh too much)
Um.
My basic take on enums is that they provide a convenient namespace to
collect together related constants. API flags and opcodes are an
obvious example of relat
I am using this example for threading in Python:
from threading import Thread
def start_test( address, port ):
print address, port
sleep(1)
for line in big_list:
t = Thread(target=start_test, args=(line, 80))
t.start()
But say big_list has thousands of items and I only want to h
On Sat, Jan 25, 2020 at 7:35 AM Matt wrote:
>
> I am using this example for threading in Python:
>
> from threading import Thread
>
> def start_test( address, port ):
> print address, port
> sleep(1)
>
> for line in big_list:
> t = Thread(target=start_test, args=(line, 80))
> t.sta
On Sat, 25 Jan 2020 07:43:49 +1100
Chris Angelico wrote:
> On Sat, Jan 25, 2020 at 7:35 AM Matt wrote:
> >
> > I am using this example for threading in Python:
> >
> > from threading import Thread
> >
> > def start_test( address, port ):
> > print address, port
> > sleep(1)
> >
> > for l
So I would create 10 threads. And each would pop items off list like so?
def start_test():
while big_list:
list_item = big_list.pop()
print list_item, port
sleep(1)
port = 80
for i = 1 to 10
t = Thread(target=start_test)
t.start()
t.join()
Would that be t
On 2020-01-24 21:33, Matt wrote:
So I would create 10 threads. And each would pop items off list like so?
def start_test():
while big_list:
list_item = big_list.pop()
print list_item, port
sleep(1)
port = 80
for i = 1 to 10
t = Thread(target=start_test)
Created this example and it runs.
import time
import threading
big_list = []
for i in range(1, 200):
big_list.append(i)
def start_test():
while big_list: #is this
list_item = big_list.pop() #and this thread safe
print list_item, port
time.sleep(1)
print
On Sat, Jan 25, 2020 at 9:05 AM Matt wrote:
>
> Created this example and it runs.
>
> import time
> import threading
>
> big_list = []
>
> for i in range(1, 200):
> big_list.append(i)
>
> def start_test():
> while big_list: #is this
> list_item = big_list.pop() #and this thread
First come remarks, then a different suggestion about your capacity
problem (no more than 10). Details below.
On 24Jan2020 16:03, Matt wrote:
Created this example and it runs.
[...]
big_list = []
for i in range(1, 200):
big_list.append(i)
You can just go:
big_list.extend(range(1,200
> Not quite.
>
> 1. Create a list of threads.
>
> 2. Put the items into a _queue_, not a list.
>
> 3. Start the threads.
>
> 4. Iterate over the list of threads, using .join() on each.
>
> If you're going to start the threads before you've put all of the items
> into the queue, you can also put a
On Thu, Jan 23, 2020 at 2:57 AM Z wrote:
>
> what is PLR?
Python Language Reference?
https://docs.python.org/3/reference/index.html
Or, perhaps, Python Library Reference?
https://docs.python.org/3/library/index.html
--
boB
--
https://mail.python.org/mailman/listinfo/python-list
12 matches
Mail list logo