parallel/concurrent process in python

Ommer.Simjee at Ommer.Simjee at
Mon Mar 9 22:47:37 CET 2009

I'm trying to figure out parallel process python code. Something
similar to fork funtion in C.

For example, I using sniff tool in scapy to capture packets but i want
this to run in the background:

from scapy.all import *
import subprocess
import netsnmp

pkts=sniff(iface="eth0",filter="UDP",count=100) # This should run in
the background

print "Next Code."'

"Next Code." should be printed out right away and does not have to
wait for pkts=sniff(...) to finish.

Any ideas?

Ommer S.

More information about the Python-list mailing list