Skip to content

Instantly share code, notes, and snippets.

@jrossi
Created February 25, 2012 17:57
Show Gist options
  • Select an option

  • Save jrossi/1909779 to your computer and use it in GitHub Desktop.

Select an option

Save jrossi/1909779 to your computer and use it in GitHub Desktop.
import splicetee
import os
import socket
s = 10000
pipe1 = os.pipe()
#pipe2 = os.pipe()
f1 = open('inf','r')
f2 = open('outf','w')
print dir(f1)
in_fd = pipe1[0]
out_fd = pipe1[1]
c = splicetee.splice( f1.fileno(), 0, out_fd, 0, s, 0)
print c
x = splicetee.splice( in_fd, 0, f2.fileno(), 0, s, 0)
print x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment