Commit db9bec87 authored by David Wilson's avatar David Wilson

Implement Alex's awesome idea of zlibbing the first stage too! Closes #49

parent 8dcfb1b7
......@@ -727,9 +727,9 @@ class Stream(mitogen.core.Stream):
source = textwrap.dedent('\n'.join(source.strip().split('\n')[2:]))
source = source.replace(' ', '\t')
source = source.replace('CONTEXT_NAME', self.remote_name)
encoded = source.encode('base64').replace('\n', '')
encoded = source.encode('zlib').encode('base64').replace('\n', '')
return [self.python_path, '-c',
'exec("%s".decode("base64"))' % (encoded,)]
'exec("%s".decode("base64").decode("zlib"))' % (encoded,)]
def get_preamble(self):
parent_ids = mitogen.parent_ids[:]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment