def create_repository(self, path, info=None, description=None, replace=True, allowNoneEmpty=True, raiseError=True):
assert isinstance(raiseError, bool), "<STR_LIT>"<EOL>assert isinstance(allowNoneEmpty, bool), "<STR_LIT>"<EOL>assert isinstance(replace, bool), "<STR_LIT>"<EOL>assert isinstance(path, basestring), "<STR_LIT>"<EOL>if info is None:<EOL><INDENT>info = '<STR_LIT>'<EOL><DEDENT>try:<EOL><INDENT>pickle.dumps(info)<EOL><DEDENT>except Exception as err:<EOL><INDENT>raise Exception("<STR_LIT>"%str(err))<EOL><DEDENT>if description is None:<EOL><INDENT>description = '<STR_LIT>'<EOL><DEDENT>assert isinstance(description, basestring), "<STR_LIT>"<EOL>if path.strip() in ('<STR_LIT>','<STR_LIT:.>'):<EOL><INDENT>path = os.getcwd()<EOL><DEDENT>realPath = os.path.realpath( os.path.expanduser(path) )<EOL>message = []<EOL>if self.is_repository(realPath):<EOL><INDENT>if not replace:<EOL><INDENT>message.append("<STR_LIT>"%path)<EOL>return False, message<EOL><DEDENT>else:<EOL><INDENT>message.append("<STR_LIT>"%path)<EOL>try:<EOL><INDENT>for _df in os.listdir(realPath):<EOL><INDENT>_p = os.path.join(realPath, _df)<EOL>if os.path.isdir(_p):<EOL><INDENT>shutil.rmtree( _p )<EOL><DEDENT>else:<EOL><INDENT>os.remove(_p)<EOL><DEDENT><DEDENT><DEDENT>except Exception as err:<EOL><INDENT>message.append("<STR_LIT>"%(str(err)))<EOL>return False, '<STR_LIT:\n>'.join(message)<EOL><DEDENT><DEDENT><DEDENT>if not os.path.isdir(realPath):<EOL><INDENT>os.makedirs(realPath)<EOL><DEDENT>elif len(os.listdir(realPath)) and not allowNoneEmpty:<EOL><INDENT>return False, "<STR_LIT>"<EOL><DEDENT>oldRepo = self.__repo<EOL>self.reset()<EOL>self.__path = realPath.rstrip(os.sep)<EOL>self.__repo['<STR_LIT>'] = info<EOL>saved = self.save(description=description)<EOL>if not saved:<EOL><INDENT>self.__repo = oldRepo<EOL>message.append("<STR_LIT>")<EOL>return False, '<STR_LIT:\n>'.join(message)<EOL><DEDENT>return True, '<STR_LIT:\n>'.join(message)<EOL>
create a repository in a directory. This method insures the creation of
the directory in the system if it is missing.\n

**N.B. If replace is True and existing repository is found in path, create_repository erases all existing files and directories in path.**

:Parameters:
    #. path (string): The real absolute path where to create the Repository.
       If '.' or an empty string is passed, the current working directory will be used.
    #. description (None, str): Repository main directory information.
    #. info (None, object): Repository information. It can
       be None or any pickle writable type of data.
    #. replace (boolean): Whether to replace existing repository.
    #. allowNoneEmpty (boolean): Allow creating repository in none-empty
       directory.
    #. raiseError (boolean): Whether to raise encountered error instead
       of returning failure.

:Returns:
    #. success (boolean): Whether creating repository was successful
    #. message (None, str): Any returned message.