slit by whitespace the value under the 'COMP_WORDS' key of the os.environ dictionary, substitute the result without the first element for cwords.
cwords = os . environ [ 'COMP_WORDS' ] . split ( ) [ 1 : ]