<s> import os <EOL> import sys <EOL> import subprocess <EOL> import shutil <EOL> def execute ( command ) : <EOL> try : <EOL> response = subprocess . call ( command , shell = True ) <EOL> if response == <NUM_LIT:0> : <EOL> return True <EOL> else : <EOL> return False <EOL> except subprocess . CalledProcessError as cpe : <EOL> try : <EOL> sys . stderr . write ( cpe . output ) <EOL> except TypeError : <EOL> sys . stderr . write ( str ( cpe . output ) ) <EOL> versions_dir = "<STR_LIT>" <EOL> if os . path . isdir ( versions_dir ) : <EOL> print ( "<STR_LIT>" ) <EOL> execute_command = "<STR_LIT>" + versions_dir <EOL> execute ( execute_command ) <EOL> print ( "<STR_LIT:U+0020>" ) <EOL> try : <EOL> shutil . rmtree ( versions_dir ) <EOL> except Exception as e : <EOL> print ( "<STR_LIT>" + str ( e ) ) <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> if not os . path . isdir ( versions_dir ) : <EOL> print ( "<STR_LIT>" ) <EOL> if sys . version_info [ <NUM_LIT:0> ] == <NUM_LIT:2> : <EOL> user_response = raw_input ( "<STR_LIT>" ) <EOL> else : <EOL> user_response = input ( "<STR_LIT>" ) <EOL> if user_response . lower ( ) == "<STR_LIT:y>" : <EOL> print ( "<STR_LIT>" ) <EOL> execute ( "<STR_LIT>" ) <EOL> else : <EOL> print ( "<STR_LIT>" ) <EOL> else : <EOL> print ( "<STR_LIT>" + versions_dir + "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) </s>
