0 down vote favorite I have created a network scanner, that looks for a specific port on a range of IP's. I would like to thread the application but I am getting and error message ERROR: for worker in range(network.hosts): TypeError: 'method' object cannot be interpreted as an integer Now I understand why the error is there it is because the IP Address is not an INT. However, what I would prefer to do is split the subnet into equal parts and run X number of IP's on a per thread bases. Example Thread 1 192.168.1 - 30 Thread 2 …

Member Avatar
Member Avatar
+0 forum 1

Hello all, I was writing code that was supposed to spawn multiple jobs from a sqlite DB and my first idea was to implement the multiprocessing Pool function. I'm not sure if this question would be better suited somewhere related to shell scripting, but I'm not sure how to call the script properly. It works fine if I'm doing Pool(3) on my local mac. The problem is the Cray machine needs you to run aprun to run in the background. So if I were to say aprun -n 64 myscript.py which was a Pool(64) it actually spawns 64 myscript.py's which …

Member Avatar
Member Avatar
+0 forum 3

Hello all, My question is hopefully particular enough to not relate to any of the other ones that I've read. I'm wanting to use subprocess and multiprocessing to spawn a bunch of jobs serially and return the return code to me. The problem is that I don't want to wait() so I can spawn the jobs all at once, but I do want to know when it finishes so I can get the return code. I'm having this weird problem where if I poll() the process it won't run. It just hangs out in the activity monitor without running (I'm …

Member Avatar
Member Avatar
+0 forum 10

I have this simple first multiprocessing code in pyton,but I encounter a BSOD when running it.Can anyone please point out what is wrong with it ? import multiprocessing def cracker(): print "Hello" return procs = [] for i in range(8): p = multiprocessing.Process(target = cracker) procs.append(p) p.start() for p in procs: p.join()

Member Avatar
Member Avatar
+0 forum 6

This example program of using the multiprocessing is crashing my i7 4 core windows7 64 bit computer (32 bit enthought Python 2.7), but is running fine in virtual machine Ubuntu with 4 cores assigned. Can anyone run it in their commputer in Windows7. My system memory (8 GB) is totally eaten by the program and mouse moves but I can not do anything with computer, even ctrl-alt-del to get to task manager. # -*- coding: utf-8 -*- from numpy import arange,sqrt, random, linalg from multiprocessing import Pool global counter counter = 0 def cb(r): global counter print counter, r counter …

Member Avatar
Member Avatar
+0 forum 2

The End.