Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
ó l]Œjc@sDdZddlZddlZddlZddlmZddlmZmZmZde fd„ƒYZ de fd„ƒYZ d e fd „ƒYZ d e fd „ƒYZ d efd„ƒYZdefd„ƒYZdfd„ƒYZeƒZedkr@d„ZeejƒeejƒejdjddƒGHndS(sÖProvides access to stored IDLE configuration information. Refer to the comments at the beginning of config-main.def for a description of the available configuration files and the design implemented to update user configuration information. In particular, user configuration choices which duplicate the defaults will be removed from the user's configuration files, and if a file becomes empty, it will be deleted. The contents of the user files may be altered using the Options/Configure IDLE menu to access the configuration GUI (configDialog.py), or manually. Throughout this module there is an emphasis on returning useable defaults when a problem occurs in returning a requested configuration value back to idle. This is to allow IDLE to continue to function in spite of errors in the retrieval of config information. When a default is returned instead of a requested config value, a message is printed to stderr to aid in configuration problem notification and resolution. iÿÿÿÿN(t macosxSupport(t ConfigParsert NoOptionErrortNoSectionErrortInvalidConfigTypecBseZRS((t__name__t __module__(((s-/usr/lib64/python2.7/idlelib/configHandler.pyRstInvalidConfigSetcBseZRS((RR(((s-/usr/lib64/python2.7/idlelib/configHandler.pyRst InvalidFgBgcBseZRS((RR(((s-/usr/lib64/python2.7/idlelib/configHandler.pyRst InvalidThemecBseZRS((RR(((s-/usr/lib64/python2.7/idlelib/configHandler.pyR stIdleConfParsercBs>eZdZdd„Zdded„Zd„Zd„ZRS(sI A ConfigParser specialised for idle configuration file handling cCs ||_tj|d|ƒdS(sK cfgFile - string, fully specified configuration file name tdefaultsN(tfileRt__init__(tselftcfgFilet cfgDefaults((s-/usr/lib64/python2.7/idlelib/configHandler.pyR #s cCsh|j||ƒs|S|dkr2|j||ƒS|dkrN|j||ƒS|j||d|ƒSdS(s Get an option value for given section/option or return default. If type is specified, return as type. tbooltinttrawN(t has_optiont getbooleantgetinttget(RtsectiontoptionttypetdefaultR((s-/usr/lib64/python2.7/idlelib/configHandler.pytGet*s  cCs$|j|ƒr|j|ƒSgSdS(s6 Get an option list for given section N(t has_sectiontoptions(RR((s-/usr/lib64/python2.7/idlelib/configHandler.pyt GetOptionList8s cCs|j|jƒdS(s7 Load the configuration file from disk N(treadR (R((s-/usr/lib64/python2.7/idlelib/configHandler.pytLoadAsN( RRt__doc__tNoneR tFalseRRR!(((s-/usr/lib64/python2.7/idlelib/configHandler.pyR s   tIdleUserConfParsercBsMeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS(sG IdleConfigParser specialised for user configuration handling. cCs#|j|ƒs|j|ƒndS(s2 if section doesn't exist, add it N(Rt add_section(RR((s-/usr/lib64/python2.7/idlelib/configHandler.pyt AddSectionLscCs:x3|jƒD]%}|j|ƒs |j|ƒq q WdS(s: remove any sections that have no options N(tsectionsRtremove_section(RR((s-/usr/lib64/python2.7/idlelib/configHandler.pytRemoveEmptySectionsSscCs"|jƒ|jƒrdSdSdS(sp Remove empty sections and then return 1 if parser has no sections left, else return 0. iiN(R*R((R((s-/usr/lib64/python2.7/idlelib/configHandler.pytIsEmpty[s  cCs#|j|ƒr|j||ƒSdS(sl If section/option exists, remove it. Returns 1 if option was removed, 0 otherwise. N(Rt remove_option(RRR((s-/usr/lib64/python2.7/idlelib/configHandler.pyt RemoveOptionfscCs‚|j||ƒrH|j||ƒ|kr.dS|j|||ƒdSn6|j|ƒsg|j|ƒn|j|||ƒdSdS(s‚ Sets option to value, adding section if required. Returns 1 if option was added or changed, otherwise 0. iiN(RRtsetRR&(RRRtvalue((s-/usr/lib64/python2.7/idlelib/configHandler.pyt SetOptionnscCs,tjj|jƒr(tj|jƒndS(sF Removes the user config file from disk if it exists. N(tostpathtexistsR tremove(R((s-/usr/lib64/python2.7/idlelib/configHandler.pyt RemoveFilescCsv|jƒsh|j}yt|dƒ}Wn-tk rWtj|ƒt|dƒ}nX|j|ƒn |jƒdS(sÆUpdate user configuration file. Remove empty sections. If resulting config isn't empty, write the file to disk. If config is empty, remove the file from disk if it exists. twN(R+R topentIOErrorR1tunlinktwriteR5(RtfnameR((s-/usr/lib64/python2.7/idlelib/configHandler.pytSave†s    ( RRR"R'R*R+R-R0R5R<(((s-/usr/lib64/python2.7/idlelib/configHandler.pyR%Gs     tIdleConfcBs eZdZd„Zd„Zd„Zddeed„Z d„Z d„Z dd„Z d„Z d „Zd „Zeeed „Zd „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zdd„Zd„Zd„Zd„Zd„ZRS(së holds config parsers for all idle config files: default config files (idle install dir)/config-main.def (idle install dir)/config-extensions.def (idle install dir)/config-highlight.def (idle install dir)/config-keys.def user config files (user home dir)/.idlerc/config-main.cfg (user home dir)/.idlerc/config-extensions.cfg (user home dir)/.idlerc/config-highlight.cfg (user home dir)/.idlerc/config-keys.cfg cCs3i|_i|_i|_|jƒ|jƒdS(N(t defaultCfgtuserCfgtcfgtCreateConfigHandlerst LoadCfgFiles(R((s-/usr/lib64/python2.7/idlelib/configHandler.pyR ¦s     cCsîtdkr!tjjtƒ}ntjjtjdƒ}|jƒ}d }i}i}xP|D]H}tjj|d|dƒ||R%R?(RtidleDirtuserDirt configTypest defCfgFilest usrCfgFilestcfgType((s-/usr/lib64/python2.7/idlelib/configHandler.pyRA®s   !% cCsd}tjjdƒ}|dkrxtjj|ƒsxd|d}ytjj|ƒWntk rknXd}qxn|dkr“tjƒ}ntjj ||ƒ}tjj|ƒs ytj |ƒWq t tfk rd|d}tjj|ƒt ‚q Xn|S(sr Creates (if required) and returns a filesystem directory for storing user config files. s.idlerct~s. Warning: os.path.expanduser("~") points to s , but the path does not exist. s2 Warning: unable to create user config directory s) Check path and permissions. Exiting! ( R1R2t expanduserR3RKtstderrR:R8tgetcwdRMtmkdirtOSErrort SystemExit(RtcfgDirROtwarn((s-/usr/lib64/python2.7/idlelib/configHandler.pyRLÃs*     c CsGy@|j|j||ƒr?|j|j||d|d|ƒSWnhtk rªd||||j|j||d|ƒf}ytjj|ƒWq«tk r¦q«XnXy@|j|j||ƒrê|j|j||d|d|ƒSWntk rþnX|rCd|||f}ytjj|ƒWqCtk r?qCXn|S(sf Get an option value for given config type and given general configuration section/option or return a default. If type is specified, return as type. Firstly the user configuration is checked, with a fallback to the default configuration, and a final 'catch all' fallback to a useable passed-in default if the option isn't present in either the user or the default configuration. configType must be one of ('main','extensions','highlight','keys') If a default is returned, and warn_on_default is True, a warning is printed to stderr. RRsv Warning: configHandler.py - IdleConf.GetOption - invalid %r value for configuration option %r from section %r: %r sŽ Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option %r from section %r. returning default value: %r ( R?RRt ValueErrorRKRVR:R8R>( Rt configTypeRRRRtwarn_on_defaultRtwarning((s-/usr/lib64/python2.7/idlelib/configHandler.pyt GetOptionâs6      cCs|j|j|||ƒdS(s?In user's config file, set section's option to value. N(R?R0(RR^RRR/((s-/usr/lib64/python2.7/idlelib/configHandler.pyR0scCsc|d krtd‚n|dkr4|j|}n%|dkrP|j|}n td‚|jƒS( sò Get a list of sections from either the user or default config for the given config type. configSet must be either 'user' or 'default' configType must be one of ('main','extensions','highlight','keys') RDRERFRGsInvalid configType specifiedtuserRsInvalid configSet specified(smains extensionss highlightskeys(RR?R>RR((Rt configSetR^t cfgParser((s-/usr/lib64/python2.7/idlelib/configHandler.pytGetSectionLists     cCsÅ|jdj|ƒr+|jd|ƒ}n|jd|ƒ}||d}|dkrd|d}n||d}i|d6|d 6}|s�|S|d kr¤|dS|d kr¸|d Std ‚d S(s$ return individual highlighting theme elements. fgBg - string ('fg'or'bg') or None, if None return a dictionary containing fg and bg colours (appropriate for passing to Tkinter in, e.g., a tag_config call), otherwise fg or bg colour only as specified. RFRRbs -foregroundtcursorsnormal-backgrounds -backgroundt foregroundt backgroundtfgtbgsInvalid fgBg specifiedN(R>Rt GetThemeDictR(RtthemetelementtfgBgt themeDicttforetbackRF((s-/usr/lib64/python2.7/idlelib/configHandler.pyt GetHighlight)s    cCs™|dkr|jd}n%|dkr8|jd}n td‚idd6dd6dd 6dd 6dd 6dd 6dd 6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6dd!6dd"6}xŽ|jƒD]€}|j||ƒskd#||||f}ytjj|ƒWqktk rgqkXn|j ||d||ƒ}|||R RGRRKRVR:R8R(RRt themeNameRdRlRmR`tcolour((s-/usr/lib64/python2.7/idlelib/configHandler.pyRkDsV      cCs|jdddddƒS(s@ Returns the name of the currently active theme RDtThemetnameRt(Ra(R((s-/usr/lib64/python2.7/idlelib/configHandler.pyt CurrentTheme„scCs|jdddddƒS(sB Returns the name of the currently active key set RDtKeysRwRRx(Ra(R((s-/usr/lib64/python2.7/idlelib/configHandler.pyt CurrentKeysŠsc Cs|j|jddƒƒ}|j|jddƒƒ}x*|D]"}||kr=|j|ƒq=q=W|rg}xš|D]’}|jd|ddtddƒrv|s©|rø|r¸d}nd}|jd||dtddd tƒr|j|ƒqq|j|ƒqvqvW|S|Sd S( s¡ Gets a list of all idle extensions declared in the config files. active_only - boolean, if true only return active (enabled) extensions RRERbtenableRRt enable_editort enable_shellR_N(tRemoveKeyBindNamesRetappendRatTrueR$( Rt active_onlyt editor_onlyt shell_onlytextnst userExtnstextnt activeExtnsR((s-/usr/lib64/python2.7/idlelib/configHandler.pyt GetExtensions�s.        cCsu|}g}x6|D].}|jdƒr|j|j|ƒƒqqW|jƒ|jƒx|D] }||=q`W|S(Nt _bindingst _cfgBindings(RŠR‹(tendswithR€tindextsorttreverse(Rt extnNameListtnamestkbNameIndiciesRwR�((s-/usr/lib64/python2.7/idlelib/configHandler.pyR±s     cCsjd}d|d}xO|jddƒD];}x2|j|ƒjƒD]}||krC|}qCqCWq'W|S(sü Returns the name of the extension that virtualEvent is bound in, or None if not bound in any extension. virtualEvent - string, name of the virtual event to test for, without the enclosing '<< >>' s<>R‚iN(R#R‰tGetExtensionKeysRG(Rt virtualEventtextNametvEventR‡tevent((s-/usr/lib64/python2.7/idlelib/configHandler.pytGetExtnNameForEvent¾s c Cs‚|d}|jƒ}i}|jdj|ƒr~|jdj|ƒ}x3|D](}d|d}||}|||>(tGetCurrentKeySetR>RR( Rt extensionNametkeysNamet activeKeystextKeyst eventNamest eventNameR—tbinding((s-/usr/lib64/python2.7/idlelib/configHandler.pyR“Ís    cCs�|d}i}|jdj|ƒr‰|jdj|ƒ}xJ|D]?}|jd||ddƒjƒ}d|d}|||>(R>RRRatsplit(RRšR›R�RžRŸR R—((s-/usr/lib64/python2.7/idlelib/configHandler.pyt__GetRawExtensionKeysÞs   cCs–|d}|j|ƒ}|jdj|ƒr’|jdj|ƒ}xJ|D]?}|jd||ddƒjƒ}d|d}|||>(R“R>RRRaR¡(RRšt bindsNametextBindsRžRŸR R—((s-/usr/lib64/python2.7/idlelib/configHandler.pytGetExtensionBindingsïs   cCs2|dd!}|jd||ddƒjƒ}|S(sõ returns the keybinding for a specific event. keySetName - string, name of key binding set eventStr - string, the virtual event we want the binding for, represented as a string, eg. '<>' iiþÿÿÿRGRRx(RaR¡(Rt keySetNameteventStrRŸR ((s-/usr/lib64/python2.7/idlelib/configHandler.pyt GetKeyBindings !cCsƒ|j|jƒƒ}tjƒrx[|jƒD]J\}}g|D]}|jddƒ^qA}||kr.|||>' s<>(R²RG(RR”((s-/usr/lib64/python2.7/idlelib/configHandler.pyt IsCoreBinding.scCsŠi1ddgd6ddgd6ddgd 6d d gd 6d gd6dgd6dgd6dgd6dgd6dgd6dgd6dgd6dgd6dgd6dgd 6d!gd"6d#gd$6d%gd&6d'gd(6d)gd*6d+gd,6d-gd.6d/gd06d1gd26d3gd46d5gd66d7gd86d9gd:6d;gd<6d=gd>6d?d@gdA6dBgdC6dDgdE6dFgdG6dHgdI6dJgdK6dLgdM6dNdOgdP6dQgdR6dSgdT6dUgdV6dWgdX6dYgdZ6d[gd\6d]gd^6d_gd`6dagdb6dcgdd6degdf6}|r†x{|jƒD]j}|j||ƒ}|r@|||s s<>s s s<>s s s <>s ss<>s s<>s s<>ss<>s<>s s<>ss<>s s<>ss<>ss<>s<>ss<>s s<>ss<>ss<>s s<>s s<>s s<>s s<>s s<>ss<>s s<>ss<>s s<>ss<>ss<>s s<>s ss<>ss<>s s<>s s<>s s <>ss <>ss<>s ss<>s s<>ss<>ss<>s s<>s s<>s s<>s s<>s s<>s s<>ss<>ss<>s‘ Warning: configHandler.py - IdleConf.GetCoreKeys - problem retrieving key binding for event %r from key set %r. returning default value: %r (RGR¨RKRVR:R8(RR¦t keyBindingsR—R R`((s-/usr/lib64/python2.7/idlelib/configHandler.pyR²6s|                                                     c Csg}|dkr"|jd}n%|dkr>|jd}n td‚|jdƒ}x¡|D]™}|jd|ddƒ}|jdƒdkrŸd}d}n2tj|dƒ}|d jƒ}|d jƒ}|r]|r]|j |||fƒq]q]W|j d d „ƒ|S( s¹Fetch list of extra help sources from a given configSet. Valid configSets are 'user' or 'default'. Return a list of tuples of the form (menu_item , path_to_help_file , option), or return the empty list. 'option' is the sequence number of the help resource. 'option' values determine the position of the menu items on the Help menu, therefore the returned list must be sorted by 'option'. RbRDRsInvalid configSet specifiedt HelpFilest;iÿÿÿÿRxiitkeycSst|dƒS(Ni(R(R°((s-/usr/lib64/python2.7/idlelib/configHandler.pyt s( R?R>RRRtfindtstringR¡tstripR€RŽ( RRct helpSourcesRdRRR/tmenuItemthelpPath((s-/usr/lib64/python2.7/idlelib/configHandler.pytGetExtraHelpSourceListƒs&       cCs |jdƒ|jdƒ}|S(sÝ Returns a list of tuples containing the details of all additional help sources configured, or an empty list if there are none. Tuples are of the format returned by GetExtraHelpSourceList. RRb(RÂ(RtallHelpSources((s-/usr/lib64/python2.7/idlelib/configHandler.pytGetAllExtraHelpSourcesList£s cCs@x9|jjƒD](}|j|jƒ|j|jƒqWdS(s/ load all configuration files. N(R>RGR!R?(RRº((s-/usr/lib64/python2.7/idlelib/configHandler.pyRB­scCs/x(|jjƒD]}|j|jƒqWdS(sH write all loaded user configuration files back to disk N(R?RGR<(RRº((s-/usr/lib64/python2.7/idlelib/configHandler.pytSaveUserCfgFilesµsN(RRR"R RARLR#R�R$RaR0ReRrRkRyR{R‰RR˜R“R³R¥R¨R™R©R¶R²RÂRÄRBRÅ(((s-/usr/lib64/python2.7/idlelib/configHandler.pyR=˜s6    /    @  !        M RCcCsždG|GdGHxŠ|jƒD]|}||jƒ}|GH|GHxY|D]Q}||j|ƒ}|GH|GHx+|D]#}|GdG||j||ƒGHqkWqAWqWdS(Ns t=(RGR(RR(R@RºR(RRR((s-/usr/lib64/python2.7/idlelib/configHandler.pytdumpCfgÀs   RDRvRw(R"R1RKR½tidlelibRRRRt ExceptionRRRR R R%R=tidleConfRRÇR>R?R(((s-/usr/lib64/python2.7/idlelib/configHandler.pyts(   (Qÿÿ&