(self)
return code_skeleton
Creates the code file.
Creates the code file.
Creates the code file .
def compile(self):
        '''
        Creates the code file.
        '''
        code_head = ExistingCode.CODE_HEAD.value
        script_dirs_code = self.build_script_dirs()
        imports_code = self.build_imports()
        class_dec = ExistingCode.CLASS_TEMPLATE.value
        class_funcs = '\n\n'.join(self.funcs)
        class_type = ExistingCode.FILE_ITEMS.value
        if self.type in ['DIRECTORY_BACKGROUND', 'DESKTOP_BACKGROUND']:
            class_type = ExistingCode.BACKGROUND_ITEMS.value
        class_body = '\n'.join(map(lambda x: '\t\t' + x, self.body_commands))

        code_skeleton = '''
{}
{}
{}
{}
{}
{}
{}
    '''.format(code_head, script_dirs_code, imports_code, class_dec, class_funcs, class_type, class_body)

        return code_skeleton
def compile ( self ) : code_head = ExistingCode . CODE_HEAD . value script_dirs_code = self . build_script_dirs ( ) imports_code = self . build_imports ( ) class_dec = ExistingCode . CLASS_TEMPLATE . value class_funcs = '\n\n' . join ( self . funcs ) class_type = ExistingCode . FILE_ITEMS . value if self . type in [ 'DIRECTORY_BACKGROUND' , 'DESKTOP_BACKGROUND' ] : class_type = ExistingCode . BACKGROUND_ITEMS . value class_body = '\n' . join ( map ( lambda x : '\t\t' + x , self . body_commands ) ) code_skeleton = '''
{}
{}
{}
{}
{}
{}
{}
    ''' . format ( code_head , script_dirs_code , imports_code , class_dec , class_funcs , class_type , class_body ) return code_skeleton