Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 27 lines (23 sloc) 0.764 kB
8fe3592 @apenwarr Don't require the remote server to have sshuttle installed.
apenwarr authored
1 import sys, zlib
2
3 z = zlib.decompressobj()
4 mainmod = sys.modules[__name__]
5 while 1:
6 name = sys.stdin.readline().strip()
7 if name:
8 nbytes = int(sys.stdin.readline())
9 if verbosity >= 2:
7043195 @apenwarr Add -N (--auto-nets) option for auto-discovering subnets.
apenwarr authored
10 sys.stderr.write('server: assembling %r (%d bytes)\n'
8fe3592 @apenwarr Don't require the remote server to have sshuttle installed.
apenwarr authored
11 % (name, nbytes))
12 content = z.decompress(sys.stdin.read(nbytes))
13 exec compile(content, name, "exec")
14
15 # FIXME: this crushes everything into a single module namespace,
16 # then makes each of the module names point at this one. Gross.
17 assert(name.endswith('.py'))
18 modname = name[:-3]
19 mainmod.__dict__[modname] = mainmod
20 else:
21 break
22
23 verbose = verbosity
24 sys.stderr.flush()
25 sys.stdout.flush()
26 main()
Something went wrong with that request. Please try again.