<s> import sys <EOL> import os <EOL> import subprocess <EOL> import logging <EOL> def callBlender ( filepath ) : <EOL> import json <EOL> path_config = os . path . join ( os . path . dirname ( os . path . realpath ( __file__ ) ) , '<STR_LIT>' ) <EOL> logging . debug ( path_config ) <EOL> with open ( path_config , "<STR_LIT:r>" ) as config : <EOL> print ( "<STR_LIT>" ) <EOL> logging . debug ( '<STR_LIT>' ) <EOL> config = json . load ( config ) <EOL> blender_path = config [ "<STR_LIT>" ] <EOL> logging . info ( blender_path ) <EOL> blendfile_render = os . path . join ( os . path . dirname ( os . path . realpath ( __file__ ) ) , "<STR_LIT>" ) <EOL> command = [ blender_path , "<STR_LIT>" , blendfile_render , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , filepath ] <EOL> proc = subprocess . Popen ( command ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> logging . basicConfig ( filename = '<STR_LIT>' , level = logging . DEBUG ) <EOL> if len ( sys . argv ) > <NUM_LIT:1> : <EOL> logging . info ( '<STR_LIT>' ) <EOL> for filepath in sys . argv [ <NUM_LIT:1> : ] : <EOL> logging . info ( filepath ) <EOL> callBlender ( filepath ) <EOL> else : <EOL> logging . info ( '<STR_LIT>' ) <EOL> raw_input ( ) </s>
