<s> import os <EOL> import sys <EOL> import urllib2 <EOL> import subprocess <EOL> installationPath = os . path . expanduser ( '<STR_LIT>' ) + '<STR_LIT>' <EOL> serverLocalLocation = installationPath + '<STR_LIT>' <EOL> serverWebLocation = '<STR_LIT>' <EOL> try : <EOL> print '<STR_LIT>' <EOL> if not os . path . isdir ( installationPath ) : <EOL> os . makedirs ( installationPath ) <EOL> print '<STR_LIT>' <EOL> latest = urllib2 . urlopen ( serverWebLocation ) <EOL> output = open ( serverLocalLocation , '<STR_LIT:wb>' ) <EOL> output . write ( latest . read ( ) ) <EOL> output . close ( ) <EOL> print '<STR_LIT>' <EOL> subprocess . check_output ( [ '<STR_LIT>' , '<STR_LIT>' , serverLocalLocation ] ) <EOL> print '<STR_LIT>' <EOL> profile = open ( os . path . expanduser ( '<STR_LIT>' ) + '<STR_LIT>' , '<STR_LIT:a>' ) <EOL> profile . write ( serverLocalLocation + '<STR_LIT>' ) <EOL> profile . close ( ) <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> print serverLocalLocation + '<STR_LIT>' <EOL> except : <EOL> print '<STR_LIT>' <EOL> sys . exit ( <NUM_LIT:1> ) </s>
