<s> import os . path <EOL> head = os . path . dirname ( __file__ ) <EOL> TARGETS = { <EOL> '<STR_LIT>' : dict ( <EOL> options = [ <EOL> '<STR_LIT>' , <EOL> os . path . join ( head , '<STR_LIT>' , '<STR_LIT:src>' ) , <EOL> ] , <EOL> downloads = [ <EOL> dict ( <EOL> url = '<STR_LIT>' , <EOL> dst = os . path . join ( head , '<STR_LIT>' ) , <EOL> unzip = True , <EOL> ) <EOL> ] , <EOL> ) , <EOL> } <EOL> PACKAGE = { <EOL> '<STR_LIT:title>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> def setup ( targets ) : <EOL> '''<STR_LIT>''' <EOL> util . setup ( targets ) <EOL> def translate ( ) : <EOL> '''<STR_LIT>''' <EOL> util . translate ( ) <EOL> def install ( package ) : <EOL> '''<STR_LIT>''' <EOL> util . install ( package ) <EOL> import sys <EOL> import os <EOL> examples = head = os . path . abspath ( os . path . dirname ( __file__ ) ) <EOL> while os . path . split ( examples ) [ <NUM_LIT:1> ] . lower ( ) != '<STR_LIT>' : <EOL> examples = os . path . split ( examples ) [ <NUM_LIT:0> ] <EOL> if not examples : <EOL> raise ValueError ( "<STR_LIT>" ) <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . join ( examples ) ) <EOL> from _examples import util <EOL> sys . path . pop ( <NUM_LIT:0> ) <EOL> util . init ( head ) <EOL> setup ( TARGETS ) <EOL> translate ( ) <EOL> install ( PACKAGE ) </s>
