Skip to content

Instantly share code, notes, and snippets.

@Averroes
Created April 10, 2015 17:23
Show Gist options
  • Select an option

  • Save Averroes/195f945468d202a340a4 to your computer and use it in GitHub Desktop.

Select an option

Save Averroes/195f945468d202a340a4 to your computer and use it in GitHub Desktop.
simple communication between interpreters
from multiprocessing.connection import Client
c = Client(('localhost', 25000), authkey=b'peekaboo')
c.send('hello')
print('Got:', c.recv())
c.send(42)
print('Got:', c.recv())
c.send([1, 2, 3, 4, 5])
print('Got:', c.recv())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment