On 04Jun2015 10:20, M2 wrote:
Awesome Cameron.
It works the way I want it to work.
Glad to hear it. A few small remarks:
Thanks a lot guys.
Here is the new code:
[...]
from thread import start_new_thread
You're not using this any more. You may want to tidy this up.
def proc(col) :
On Wednesday, June 3, 2015 at 3:41:15 PM UTC-5, M2 wrote:
> Hello
> I am trying to create multiple thread through the below program but I am
> getting an error
>
> #! /usr/bin/python
> import os
> import subprocess
> import thread
> import threading
> from thread import start_new_thread
>
> def
proc(f) isn't a callable, it's whatever it returns. IIRC, you need to do
something like 'start_new_thread(proc, (f,))'
--
https://mail.python.org/mailman/listinfo/python-list
On 06/03/2015 01:41 PM, Mohan Mohta wrote:
Hello
I am trying to create multiple thread through the below program but I am
getting an error
#! /usr/bin/python
import os
import subprocess
import thread
import threading
from thread import start_new_thread
def proc(f) :
com1="ssh -B "
On 03Jun2015 19:59, M2 wrote:
On Wednesday, June 3, 2015 at 7:38:22 PM UTC-5, Cameron Simpson wrote:
I would be passing only "line" to proc, not "f" at all.
Suggestion: move your main code into its own function. That will make all the
variables in it "local". Your proc function is presently re
On Wednesday, June 3, 2015 at 7:38:22 PM UTC-5, Cameron Simpson wrote:
> On 03Jun2015 17:04, M2 wrote:
> >On Wednesday, June 3, 2015 at 6:56:47 PM UTC-5, sohca...@gmail.com wrote:
> >> On Wednesday, June 3, 2015 at 4:45:52 PM UTC-7, M2 wrote:
> >> > On Wednesday, June 3, 2015 at 5:34:31 PM UTC-5,
On 03Jun2015 17:04, M2 wrote:
On Wednesday, June 3, 2015 at 6:56:47 PM UTC-5, sohca...@gmail.com wrote:
On Wednesday, June 3, 2015 at 4:45:52 PM UTC-7, M2 wrote:
> On Wednesday, June 3, 2015 at 5:34:31 PM UTC-5, Waffle wrote:
> > You think "(f)" makes a tuple, but it does not.
> > the parentesi
On Wednesday, June 3, 2015 at 6:56:47 PM UTC-5, sohca...@gmail.com wrote:
> On Wednesday, June 3, 2015 at 4:45:52 PM UTC-7, M2 wrote:
> > On Wednesday, June 3, 2015 at 5:34:31 PM UTC-5, Waffle wrote:
> > > You think "(f)" makes a tuple, but it does not.
> > > the parentesis is not the tuple constru
On Wednesday, June 3, 2015 at 4:45:52 PM UTC-7, M2 wrote:
> On Wednesday, June 3, 2015 at 5:34:31 PM UTC-5, Waffle wrote:
> > You think "(f)" makes a tuple, but it does not.
> > the parentesis is not the tuple constructor, the comma is
> > try:
> > t=thread.start_new_thread(proc,(f,))
>
> Thanks f
On Wednesday, June 3, 2015 at 5:34:31 PM UTC-5, Waffle wrote:
> You think "(f)" makes a tuple, but it does not.
> the parentesis is not the tuple constructor, the comma is
> try:
> t=thread.start_new_thread(proc,(f,))
Thanks for the pointer waffle.
The program executes now but still not the way I
You think "(f)" makes a tuple, but it does not.
the parentesis is not the tuple constructor, the comma is
try:
t=thread.start_new_thread(proc,(f,))
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, June 3, 2015 at 4:01:13 PM UTC-5, Sam Raker wrote:
> proc(f) isn't a callable, it's whatever it returns. IIRC, you need to do
> something like 'start_new_thread(proc, (f,))'
If I execute something like
t=thread.start_new_thread(proc,(f))
I get:
Traceback (most recent call last):
On 2015-06-03 21:41, Mohan Mohta wrote:
Hello
I am trying to create multiple thread through the below program but I am
getting an error
#! /usr/bin/python
import os
import subprocess
import thread
import threading
from thread import start_new_thread
def proc(f) :
com1="ssh -B "
Hello
I am trying to create multiple thread through the below program but I am
getting an error
#! /usr/bin/python
import os
import subprocess
import thread
import threading
from thread import start_new_thread
def proc(f) :
com1="ssh -B "
com2=line.strip('\n')
com3= " un
14 matches
Mail list logo