CIServer.py
def shell_source(script, ccwd):
    """Sometime you want to emulate the action of "source" in bash,
    settings some environment variables. Here is a way to do it."""
    import subprocess, os
    pipe = subprocess.Popen(". %s; env" % script, stdout=subprocess.PIPE, cwd=ccwd, shell=True, encoding='utf-8')
    output = pipe.communicate()[0]
    env = dict((line.split("=", 1) for line in output.splitlines()))
    os.environ.update(env)
Sometime you want to emulate the action of "source" in bash,
    settings some environment variables. Here is a way to do it.
Sometime you want to emulate the action of "source" in bash,
settings some environment variables. Here is a way to do it.
Sometime you want to emulate the action of " source " in bash settings some environment variables . Here is a way to do it .
def shell_source(script, ccwd):
    import subprocess, os
    pipe = subprocess.Popen(". %s; env" % script, stdout=subprocess.PIPE, cwd=ccwd, shell=True, encoding='utf-8')
    output = pipe.communicate()[0]
    env = dict((line.split("=", 1) for line in output.splitlines()))
    os.environ.update(env)
def shell_source ( script , ccwd ) : import subprocess , os pipe = subprocess . Popen ( ". %s; env" % script , stdout = subprocess . PIPE , cwd = ccwd , shell = True , encoding = 'utf-8' ) output = pipe . communicate ( ) [ 0 ] env = dict ( ( line . split ( "=" , 1 ) for line in output . splitlines ( ) ) ) os . environ . update ( env )
Sometime you want to emulate the action of "source" in bash,
settings some environment variables.
Sometime you want to emulate the action of " source " in bash settings some environment variables .
"""Sometime you want to emulate the action of "source" in bash,
    settings some environment variables. Here is a way to do it."""
script
ccwd