def urlunparse(parts):
scheme, netloc, path, params, query, fragment = parts<EOL>if RE_DRIVE_LETTER_PATH.match(path):<EOL><INDENT>quoted_path = path[:<NUM_LIT:3>] + parse.quote(path[<NUM_LIT:3>:])<EOL><DEDENT>else:<EOL><INDENT>quoted_path = parse.quote(path)<EOL><DEDENT>return parse.urlunparse((<EOL>parse.quote(scheme),<EOL>parse.quote(netloc),<EOL>quoted_path,<EOL>parse.quote(params),<EOL>parse.quote(query),<EOL>parse.quote(fragment)<EOL>))<EOL>
Unparse and encode parts of a URI.