예제 #1
0
파일: userconfig.py 프로젝트: FNXE/pyRevit
 def get_list_separator():
     """Get list separator defined in user os regional settings."""
     intkey = coreutils.get_reg_key(wr.HKEY_CURRENT_USER,
                                    r'Control Panel\International')
     if intkey:
         try:
             return wr.QueryValueEx(intkey, 'sList')[0]
         except Exception:
             return DEFAULT_CSV_SEPARATOR
예제 #2
0
def query_filename_prompt_state(dkeys):
    state = False
    if dkeys:
        try:
            for dkey in dkeys:
                key_state = wr.QueryValueEx(dkey, r'PromptForFileName')[0]
                logger.debug('Checking reg key state: {}'.format(key_state))
                state |= int(key_state) > 0
            return state
        except Exception as key_read_err:
            logger.debug('Error accessing registry key value.'
                         ' | {}'.format(key_read_err))
    else:
        logger.debug('No registry keys are available for revu printer driver.')