
jw>c           @   s  d  Z  d Z d Z d Z d Z d Z d d l Z d d l Z d d l Z d d l	 Z	 d d l
 Z
 d d l Z d d l Z d d l Z d Z d	 d) d
     YZ d d* d     YZ d d+ d     YZ d d, d     YZ d d- d     YZ d e f d     YZ d d. d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d      YZ d! e f d"     YZ d# e f d$     YZ d% e f d&     YZ d' e f d(     YZ d S(/   st	  I Want Options

A library for managing an application's configuration, user
preferences, and/or other miscellaneous options through the application
itself. You provide the application, it provides the configuration
management.

This library has no external dependencies. It defines the following
classes:

* OptionConfig: reads from the option definition store. You can
  extend this class to read from a different format (e.g. from an XML
  file or a database).

* OptionGroup: A container for options. You probably don't need to
  extend this class.

* Option: Defines the semantics for an option (e.g. a boolean or a
  string option). You can extend this class to create options with
  application-specific semantics (see TimeZoneOption for a
  complex but generic example).

* Context: Defines the unit of configuration (e.g. for a user
  preference engine, this is your application's notion of "user"). You
  should make some existing class in your application extend this. A
  simple FileBackedContext, which simply writes key-value pairs to a
  file, is provided.

* OptionWrapper: Defines display semantics for your application.
  If you don't extend this, your option screen will look very boring
  and not like the rest of your application.

* ConfigurationCGI: Very simple logic for an option-setting CGI. You
  probably want to write your own CGI that fits in with whatever Web
  framework you're using, but this will get you started (and is great
  for demos).

* StringOption, LongStringOption, BooleanOption, SelectionOption,
  IntegerOption, EmailOption, HTMLColorOption, LanguageOption,
  TimeZoneOption, etc: Extensions of Option which implement different
  display, gathering, and validation interfaces.

To use, initialize an OptionConfig object with the path to your option
definition store and (optionally) an instance of OptionWrapper. Pass
an instance of Context to all OptionConfig methods which require one.

The option definition store looks like this:

group=OptionGroup1
This is the first option group.

name=option1
displayName=This is the first option in option group 1.
property=Options can have arbitrary properties, but the first property must be "name".
#Comments are allowed as well.

name=option2
displayName=This is the second option in option group 1.

group=OptionGroup2
This is the second option group.

name=option1
displayName=This is the first option in option group 2.

...

s*   Leonard Richardson (leonardr@segfault.org)s   $Revision: 1.31 $s   $Date: 2003/03/19 03:56:06 $s*   Copyright (c) 2002-2003 Leonard Richardsont   PythoniNt   stringt   OptionConfigc           B   st   e  Z d  Z d d  Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d   Z d	   Z d
   Z d   Z RS(   sy   This class reads from the option definition store. It instantiates
    OptionGroup objects, which contain Option objects.c         C   sO   | |  _  | s t   } n  | |  _ |  |  j _ d |  _ d |  _ d |  _ d S(   sG   Initialize variables; the data structures are populated
        lazily.N(   t   filenamet   OptionWrappert   wrappert   configt   Nonet   optionGroupListt   optionGroupMapt	   optionMap(   t   selfR   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   __init__\   s    				c         C   s   |  j  s |  j   n  |  j  S(   s   Returns a mapping of option names to Option objects. If multiple
        option groups define options with the same name, the contents of this
        map are undefined; use the option group interface instead.(   R
   t#   _OptionConfig__getOptionDefinitions(   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   getOptionMapq   s    	c         C   s   |  j  s |  j   n  |  j  S(   sW   Returns a list of OptionGroup objects, in the order in which they
        were defined.(   R   R   (   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   getOptionGroupListy   s    	c         C   s   |  j  s |  j   n  |  j  S(   s_   Returns a mapping of names of option groups to their corresponding
        OptionGroup objects.(   R	   R   (   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   getOptionGroupMap   s    	c         C   s   |  j    | S(   s   Convenience method to retrieve an option by name. This
        method's behavior is undefined if multiple option groups
        define options with the same name.(   R   (   R   t   name(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt	   getOption   s    c         C   s   |  j    | j |  S(   s   Convenience method to retrieve the value of a named option
        in the given context. This method's behavior is undefined if
        multiple option groups define options with the same name.(   R   t   getValue(   R   R   t   context(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   getOptionValue   s    c         C   s   |  j    | j |  S(   s   Convenience method to obtain the default value of the named
        option in the given context. This method's behavior is undefined if
        multiple option groups define options with the same name.(   R   t
   getDefault(   R   R   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   getOptionDefault   s    c         C   s@   g  } x3 |  j    D]% } | j |  r | j |  q q W| S(   s]   Returns only those option groups which contain options
        relevant to the given context.(   R   t   containsRelevantOptionst   append(   R   R   t   groupst   group(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   getRelevantGroups   s
    c         C   s;   |  j  s7 g  |  _  i  |  _ i  |  _ |  j |  j  n  d S(   s|   Loads option definitions into the data structures. If the
        option definitions have already been loaded, does nothing.N(   R   R
   R	   t   loadOptionDefinitionsR   (   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   __getOptionDefinitions   s
    				c         C   s  t  |  } d } d } xj| j   D]\} | d d k r% | d d k r% | d  d k r | rz | rz |  j | |  n  t | d d !|  j  } |  j j |  | |  j | j	 <d } q|  j r| d  d k r| r |  j | |  n i  } | d d !| d	 <q|  j r| rt
 j | d
  } | d k rQ| | d d !| | |  <q~| r~| j r~| d  } | j |  q~qq% q% W| r|  j | |  n  | j   d S(   s   Called by the internal initialization on the file you
        specify in the OptionConfig constructor. You can call this
        manually on additional files to dynamically add options to the
        option configuration.i    s   
t   #i   s   group=ii   s   option=R   t   =i   N(   t   openR   t	   readlinest   _OptionConfig__createOptiont   OptionGroupR   R   R   R	   R   R   t   findt   optionst   setTextt   close(   R   R   t   filet   currentGroupt   optionPropertiest   linet   it   text(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR      s6     	
c         C   s   | j  d d  } |  j j  | |  } | s> d | d  n  | j  d t  } |  j j j  | d  } | s t j |  j j j	 | } n  | |  j |  } | |  j
 | j <| j |  | j   d S(   s   Transforms a set of option properties and an OptionGroup object
        into an Option object, and registers the Option object with its
        group and the map of options by name.t   optionGroups   Option %s is not in any group!R   t   typeN(   t   getR   R	   t   DEFAULT_OPTION_TYPER   t   optionClassest   syst   modulest
   __module__t   __dict__R
   R   t	   addOptiont   clear(   R   t
   propertiest   defaultGroupt	   groupNameR   t
   optionTypet   optionClasst   option(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   __createOption   s    N(   t   __name__R6   t   __doc__R   R   R   R   R   R   R   R   R   R   R   R#   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   W   s   											%R$   c           B   sP   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 RS(   c         C   s1   | |  _  g  |  _ d |  _ | |  _ i  |  _ d  S(   Nt    (   R   R&   R.   R   t   settable(   R   R   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR      s
    				c         C   sh   |  j  j | d  } | d k rd d } x* |  j D] } | j |  r1 d } Pq1 q1 W| |  j  | <n  | S(   sn   Returns true iff this option group contains at least one option
        which can be set in the given context.i    i   N(   RD   R1   R   R&   t
   isRelevant(   R   R   RD   R?   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR      s    c         C   s   g  } x |  j  D] } | j |  r | j | | j |   } | r t |  t j k rk | j |  q t |  t j k r | j	 |  q q q q W| S(   sq   Validate all the options in this group against the given
        set of form variables. Returns a list of errors.(
   R&   RE   t   validatet   processFormValueR0   t   typest   ListTypet   extendt
   StringTypeR   (   R   R   t   formVariablest   errorsR?   t	   newErrors(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRF      s    c         C   s   | |  _  d S(   s0   Sets the descriptive text for this option group.N(   R.   (   R   R.   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR'     s    c         C   s   |  j  j |  |  S(   s3   Returns the descriptive text for this option group.(   R   t   getGroupDescription(   R   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   getText  s    c         C   s   |  j  j |  d S(   sO   Adds an option to the end of the list of options defined in
        this group.N(   R&   R   (   R   R?   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR8     s    c         C   s   |  j  S(   s2   Returns the list of options defined in this group.(   R&   (   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt
   getOptions  s    c         C   s   |  j  j |  | |  d S(   s"   Renders this option group as HTML.N(   R   t   renderGroup(   R   R   t   presetValues(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   render  s    (
   RA   R6   R   R   RF   R'   RP   R8   RQ   RT   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR$      s   	
						t   Optionc           B   sk   e  Z d    Z d   Z d
 d  Z d   Z d
 d  Z d
 d  Z d   Z	 d   Z
 d   Z d	   Z RS(   c         C   s:   | |  _  x* | j   D] \ } } t |  | |  q Wd  S(   N(   R   t   itemst   setattr(   R   R   R:   t   keyt   value(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   #  s    	c         C   s   |  j  j |  |  S(   s=   Returns true iff this option can be set in the given context.(   R   RE   (   R   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRE   -  s    c         C   s   |  j  j |  | |  d S(   sm   Renders the control to edit this option, as well as running
        any application-specific UI wrapper code.N(   R   t   renderControl(   R   R   t   presetValue(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRZ   1  s    c         C   s   |  j  j |  |  S(   s   Returns the boolean option, if any, whose value controls
        the appearance of this option. This gives you an easy way of
        making one option depend on another without having to define a
        special isRelevant() method for it.(   R   t   getControllingOption(   R   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR\   6  s    c         C   sF   | } | s$ | j  |  j d  } n  | d k rB |  j |  } n  | S(   s=   Returns the value of this option as set in the given context.N(   R1   R   R   R   (   R   R   t   overridet   val(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   ?  s    c         C   s   d  S(   N(    (   R   R   R[   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   renderEditControlH  s    c         C   s   d S(   s/   Return a list of problems with the given value.N(    (   R   R   RY   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRF   K  s    c         C   s:   |  j  |  } t |  d  r6 |  j j |  |  } n  | S(   sA   Returns the default value of this attribute in the given context.t   default(   t   getStandardDefaultt   hasattrR   R   (   R   R   R`   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   O  s    c         C   s   d S(   s   Returns the default value of this attribute as defined in its
        definition (before it's given to wrapper.getOptionDefault).RC   (    (   R   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRa   V  s    c         C   s   | j  |  j d  S(   s   Obtain the value of this option from a list of CGI variables,
        perform any neccessary processing, and return the processed value.RC   (   R1   R   (   R   t   vars(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRG   [  s    N(   RA   R6   R   RE   R   RZ   R\   R   R_   RF   R   Ra   RG   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRU   !  s   	
							t   Contextc           B   sJ   e  Z d  Z d d  Z d   Z d d  Z d   Z d   Z d   Z	 RS(   s  The context is the unit of configuration. It represents some
    resource controlled by your application, such that each different
    instance of the resource can have its own configuration settings.
    In NewsBruiser this is the Notebook object (since each notebook
    has its own distinct settings). If you are using this library to
    implement user options, this would be your user object.

    The get(), set(), and save() methods implement the interface to
    your configuration store.c         C   s   |  j    d  S(   N(   t   _Context__abstract(   R   RX   R`   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR1   l  s    c         C   s   |  j    d  S(   N(   Re   (   R   RX   RY   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   seto  s    c         C   s   d S(   s   A context which saves values on set() doesn't need a save(). You
        also might want to override this with a version of save() which takes
        an authentication token.N(    (   R   t   authenticationToken(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   saver  s    c         C   s
   d  d  S(   Ns   This is an abstract class.(    (   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt
   __abstractx  s    c         C   s   |  j  |  S(   N(   R1   (   R   RX   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   __getitem__{  s    c         C   s   |  j  | |  S(   N(   Rf   (   R   RX   RY   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   __setitem__~  s    N(
   RA   R6   RB   R   R1   Rf   Rh   Re   Rj   Rk   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRd   `  s   
			R   c           B   sn   e  Z d  Z d   Z d   Z i  d  Z d d  Z d   Z d   Z	 d   Z
 d   Z d	   Z d
   Z RS(   ss  The Option class tree implements different types of options.
    Rather than making you subclass each Option subclass to get your
    application-specific behavior for each option, or change each
    Option subclass to subclass a superclass you define, implement
    your application-specific Option and OptionGroup behavior in an
    OptionWrapper subclass and pass in an instance of it to the
    OptionConfig constructor.

    From this class you can define new option classes, change the way
    options are rendered, and the like.

    External example: NewsBruiser extends this with the
    Options.NBOptionWrapper class.c         C   s$   i  |  _  |  j t j t j  d  S(   N(   R3   t   scanModuleForOptionClassesR4   R5   R   R6   (   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR     s    	c         C   s@   x9 | j  j   D]( } t | d  r | |  j | j <q q Wd S(   s  Scans the given module for classes that provide an
        OPTION_KEY member, and registers them in the optionClasses map
        under their OPTION_KEY. If you define additional option
        classes in OptionWrapper and you want to use key names for
        them rather than their full class names, you can define
        OPTION_KEY in each Option subclass in the module and call
        scanModuleForOptionClasses(sys.modules[self.__module__]) in
        the constructor of your OptionWrapper subclass.t
   OPTION_KEYN(   R7   t   valuesRb   R3   Rm   (   R   t   modulet   c(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRl     s    	c         C   sI   xB | j    D]4 } | j |  r | j | | j | j   q q Wd S(   su   Render a group of options. Does not print out the group
        text; if you want that, you need to do it separately.N(   RQ   RE   RZ   R1   R   (   R   R   R   RS   R?   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRR     s    c         C   sm   d GHt  | d  r, d |  j | |  GHn  | j | |  d GHt  | d  rd |  j | |  GHn  d GHd S(   s-   Render an HTML depiction of the given option.s   <p>t   displayNames
   <b>%s</b>:s   <br/>t   descriptions   </p>N(   Rb   t   getOptionDisplayNameR_   t   getOptionDescription(   R   R?   R   R[   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRZ     s    c         C   s1   d } | j  |  } | r- | j |  } n  | S(   s=   Returns true iff this option can be set in the given context.i   (   R\   R   (   R   R?   R   t   relevantt   controllingOption(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRE     s
    c         C   s7   d } t | d d  } | r3 |  j j |  } n  | S(   si   A hook method to retrieve any option whose value controls whether
        or not this option is relevant.Rv   N(   R   t   getattrR   R   (   R   R?   t   noneRv   t
   optionName(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR\     s
    c         C   s   | j  S(   sR   A hook method to retrieve and possibly transform an option's
        display name.(   Rq   (   R   R?   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRs     s    c         C   s   | j  S(   sQ   A hook method to retrieve and possibly transform an option's
        description.(   Rr   (   R   R?   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRt     s    c         C   s   | j  S(   sS   A hook method to retrieve and possibly transform an option's
        default value.(   R`   (   R   R?   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR     s    c         C   s   | j  S(   sO   A hook method to retrieve and possibly transform a group's
        description.(   R.   (   R   R   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRO     s    N(   RA   R6   RB   R   Rl   RR   R   RZ   RE   R\   Rs   Rt   R   RO   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR     s   								t   FileBackedContextc           B   s5   e  Z d  Z d   Z d d  Z d   Z d   Z RS(   s   For applications in which the configuration is global, affecting the
    entire application, you can use this simple context which keeps
    its configuration options in a file whose path you specify.c         C   s   | |  _  i  |  _ | |  _ t j  j |  j   r t |  j  d  } xC | j   D]2 } t j | d  d d  \ } } | |  j | <qO Wn  d  S(   Nt   riR    i   (	   t   patht   mapR   t   ost   existsR!   R"   R   t   split(   R   R   R|   R)   R,   RX   RY   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR     s    			c         C   s1   | s |  j  j | |   } n  |  j j | |  S(   N(   R   R   R}   R1   (   R   R   R`   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR1     s    c         C   s   | |  j  | <d  S(   N(   R}   (   R   R   RY   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRf     s    c         C   sf   t  |  j d  } xC |  j j   D]2 \ } } | j d | t j | d d  f  q" W| j   d  S(   Nt   ws   %s=%s
s   
t    (   R!   R|   R}   RV   t   writeR   t   replaceR(   (   R   R)   RX   RY   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRh     s    *N(   RA   R6   RB   R   R   R1   Rf   Rh   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRz     s
   	
	t   ConfigurationCGIc           B   s   e  Z d  Z d d l Z d Z d Z d d  Z d   Z d   Z d	   Z	 d
   Z
 d   Z d   Z d   Z d   Z d   Z RS(   s  An ultra-simple configuration CGI class. Pass in an
    OptionConfig object and it will print out a form. Change items on
    the form, submit, and they're validated and propagated to the
    Context in your OptionConfig. You probably want to write your own
    CGI to make it fit in with your framework, but this is good for demos
    and quick starts.

    External example: see NewsBruiser's configure.cgi, which has
    similar logic.iNR   t   submitRC   c         C   s"  | |  _  | |  _ | |  _ | |  _ t |  d  s@ |  j   n  |  j  j   |  _ |  j j	 |  j
  } |  j  j   j	 | |  j d  |  _ d GH|  j j	 |  j  r |  j j |  j |  j  } | r d GHd GHx | D] } d | GHq Wd GHq |  j   n  |  j   |  j   |  j   d  S(   Nt	   variablesi    s   Content-type: text/html
s   <h1>Errors:</h1>s   <ul>s   <li>%s</li>s   </ul>(   R   R   t   formURLt   titleRb   t   getVariablesR   R   R   R1   t   SELECTED_GROUPR   t   selectedGroupt   SUBMIT_BUTTONRF   t   saveChangest	   startPaget	   printFormt   endPage(   R   R   R   R   R   R<   RM   t   error(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR     s.    				

c         C   s   i  |  _  t j   } | j r xx | j   D]g } t | |  t j k rx g  } x2 | | D] } | j | j	  q[ Wn | | j	 } | |  j  | <q+ Wn  d  S(   N(
   R   t   cgit   FieldStoraget   listt   keysR0   RH   RI   R   RY   (   R   t   formRX   RY   t   field(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   )  s    		c         C   sS   x? |  j  j   D]. } | j |  j  } |  j j | j |  q W|  j j   d  S(   N(   R   RQ   RG   R   R   Rf   R   Rh   (   R   R?   R^   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   9  s    c         C   s&   d GH|  j  r d |  j  GHn  d GHd  S(   Ns   <html>s   <head><title>%s</title></head>s   <body>(   R   (   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   ?  s    	c         C   s	   d GHd  S(   Ns   </body></html>(    (   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   E  s    c         C   s-   d } | |  j  k r d } n  |  j  | | S(   Nt   ?t   &(   R   (   R   t   extraQueryStringt   addOn(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   makeSelfURLH  s    	c         C   s   d |  j  GHd  S(   Ns    <form action="%s" method="post">(   R   (   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt	   startFormN  s    c         C   s	   d GHd  S(   Ns   </form>(    (   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   endFormQ  s    c         C   s>  |  j    d |  j |  j j f GHt |  j  d k r d GHx t d t |  j   D] } |  j | } | j |  j j k r | j GHn/ |  j |  j d | j  } d | | j f GH| t |  j  d k  rU d GHqU qU Wd GHn  |  j j |  j	  } | rd	 | GHn  |  j j
 |  j	 |  j  d
 |  j GH|  j   d  S(   Ns*   <input type="hidden" name="%s" value="%s">i   t   [i    R    s   <a href="%s">%s</a>s    | t   ]s   <p><i>%s</i></p>s4   <input type="submit" name="%s" value="Save changes">(   R   R   R   R   t   lenR   t   rangeR   RP   R   RT   R   R   R   (   R   R-   R   t   urlR.   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   T  s,    
	c         C   s   |  j  j | |  j  S(   s'   Returns a value from the configuration.(   R   R   R   (   R   RX   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRj   m  s    (   RA   R6   RB   R   R   R   R   R   R   R   R   R   R   R   R   Rj   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR     s   
								t   StringOptionc           B   s,   e  Z e Z d d   Z d   Z d   Z RS(   c         C   s   t  |  d  s d |  _ n  t  |  d  s6 d |  _ n  |  j rl t |  j  t |  j  k rl |  j |  _ n  d |  j t j |  j | |  d  |  j |  j f GHd S(   s8   The edit control for this option is a simple text field.t   sizei2   t	   maxLengthsA   <input type="text" name="%s" value="%s" size="%s" maxlength="%s">i   N(	   Rb   R   R   R   t   intR   R   t   escapet   getEditableValue(   R   R   R[   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR_   y  s    'c         C   sH   t  |  d d   } | rD t |  t |  k rD d | |  j | f Sd  S(   NR   sI   "%s" is too long to be a valid value for for "%s" (maximum length is %s).(   Rw   R   R   R   Rq   (   R   R   RY   t   max(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRF     s    c         C   s   t  |  j | |   } | S(   sX   Returns the value of this option, suitable for display in an HTML
        form text box.(   t   strR   (   R   R   R[   RY   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR     s    N(   RA   R6   R2   Rm   R   R_   RF   R   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   u  s   
	t   LongStringOptionc           B   s   e  Z d  Z d   Z RS(   t
   longStringc         C   sF   t  |  d  s d |  _ n  d |  j d |  j |  j | |  f GHd S(   s0   The edit control for this option is a text area.t   rowsi   sK   <p><textarea wrap="virtual" rows="%s" cols="%s" name="%s">%s</textarea></p>iP   N(   Rb   R   R   R   (   R   R   R[   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR_     s    (   RA   R6   Rm   R_   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR     s   t   BooleanOptionc           B   s5   e  Z d  Z d   Z d d  Z d   Z d   Z RS(   t   booleanc         C   s   d S(   Ni    (    (   R   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRa     s    c         C   ss   | } | s! t  j |  |  } n  t |  t j k ro t j |  } | d k s] | d k rf d } qo d } n  | S(   s>   Returns the value of this option as set for the given context.t   Yt   TRUEi   i    (   RU   R   R0   RH   RK   R   t   upper(   R   R   R]   R^   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR     s    		c         C   sT   d } | j  |  j  rP d |  j } | j  |  rP | |  j rM d } qM qP n  | S(   Nt   falses   %s-checkboxt   true(   t   has_keyR   (   R   Rc   R^   t   checkbox(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRG     s    c         C   s6   d |  j  GHd |  j  G|  j |  r- d Gn  d GHd  S(   Ns,   <input type="hidden" name="%s" value="true">s)   <input type="checkbox" name="%s-checkbox"s   checked="checked"t   >(   R   R   (   R   R   R[   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR_     s
    N(   RA   R6   Rm   Ra   R   R   RG   R_   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR     s
   			t   SelectionOptionc           B   s}   e  Z d  Z d   Z d d  Z d   Z d   Z d   Z d   Z	 d   Z
 d   Z d	   Z d
   Z d   Z d   Z RS(   t	   selectionc         C   s   t  |  d  S(   Nt   multiple(   Rb   (   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt
   isMultiple  s    c         C   sU   d } | r< |  j    } | r- | | k } qQ | | k } n | |  j |  k } | S(   Ni    (   R   t   getSelectedValues(   R   RY   R   R[   t   selectedR   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt
   isSelected  s    c         C   s   t  j |  j d  S(   Nt   ,(   R   R   Rn   (   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   getSelectionValues  s    c         C   s   t  j |  j d  S(   NR   (   R   R   t   valueDescriptions(   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   getSelectionValueDescriptions  s    c         C   s=   |  j  |  } |  j   r0 t j | d  } n	 | g } | S(   s   Returns all selected values.R   (   R   R   R   R   (   R   R   Rn   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR     s
    	c         C   s`   |  j    } |  j   } d } x; t d t |   D]$ } | | | k r4 | | } Pq4 q4 W| S(   s*   Returns the description for a given value.i    N(   R   R   R   R   R   (   R   RY   t   descriptionsRn   Rr   R-   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   getDescriptionForValue  s    
c         C   sj   |  j    rT | j |  j d  } t |  t j k r? | } qf t j | d  } n t j	 |  |  } | S(   NRC   R   (
   R   R1   R   R0   RH   RK   R   t   joinR   RG   (   R   Rc   RY   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRG     s    	c         C   s   g  } | g } |  j    r< d | k r< t j | d  } n  xC | D]; } | rC | |  j   k rC | j d | |  j f  qC qC W| S(   s,   Throw an exception if this value is invalid.R   s8   "%s" is not a valid selection value for the "%s" option.(   R   R   R   R   R   Rq   (   R   R   RY   RM   Rn   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRF     s    	!c         C   sR   |  j    rH t |  j    } | d k r3 d } n  t |  d |  } n d } | S(   Ni
   R   i   (   R   R   R   Rw   (   R   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   getSize  s    	c         C   s   d  S(   N(    (   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   getMultiple	  s    c   	      C   s   |  j  | |  } |  j   |  j   } } d } |  j   rF d } n  d |  j |  j   | f GHxX t d t |   D]A } | | } d | G|  j | | |  r d Gn  d | | GHqw Wd GHd  S(	   NRC   s   multiple="multiple"s   <select name="%s" size="%s"%s>i    s   <option value="%s"s    selected="selected"s   >%s</option>s	   </select>(	   R   R   R   R   R   R   R   R   R   (	   R   R   R[   t   selectedValueR   Rn   R   R-   RY   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR_     s    			
c         C   s(   t  j |  |  o' t |  j    d k S(   Ni   (   RU   RE   R   R   (   R   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRE     s    N(   RA   R6   Rm   R   R   R   R   R   R   R   RG   RF   R   R   R_   RE   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR     s   									
		t   IntegerOptionc           B   s    e  Z d  Z d   Z d   Z RS(   t   integerc         C   sT   t  j |  | |  t |  d  rP d t j t |  j   |  _ |  j |  _ n  d  S(   Nt   maxValuei   (	   R   R   Rb   t   matht   log10R   R   R   R   (   R   R   R:   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   (  s    c         C   s^   y t  |  } Wn d | SXt |  d  rZ | t  |  j  k rZ d | |  j |  j f Sd  S(   Ns   "%s" is not an integer.R   s0   %s is greater than the maximum "%s" value of %s.(   R   Rb   R   Rq   (   R   R   RY   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRF   /  s    	$(   RA   R6   Rm   R   RF   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   $  s   	t   EmailOptionc           B   s   e  Z d  Z d   Z RS(   t   emailc         C   s   t  j d |  s d | Sd  S(   Ns   ^.+@.+\..{2,3}$s(   "%s" is not a well-formed email address.(   t   ret   match(   R   R   RY   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRF   =  s    (   RA   R6   Rm   RF   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   7  s   t   HTMLColorOptionc           B   s/   e  Z d  Z e j d  Z d   Z d   Z RS(   t	   htmlColorsi  aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkturquoise darkviolet deeppink deepskyblue dimgray dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgreen lightgrey lightpink lightsalmon lightseagreen lightskyblue lightslategray lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose mistyrose navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray snow springgreen steelblue tan teal thistle tomato turquoise violet wheat white whitesmoke yellow yellowgreenc         C   s2   t  j |  | |  t d  |  _ |  j |  _ d  S(   Nt   lightgoldenrodyellow(   R   R   R   R   R   (   R   R   R:   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   H  s    c         C   s.   t  j d |  r* | |  j k r* d | Sd  S(   Ns   #?[A-Fa-f0-9]{6}$s1   "%s" is not an HTML color code or color constant.(   R   R   t   COLOR_CONSTANTS(   R   R   RY   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyRF   M  s    "(   RA   R6   Rm   R   R   R   R   RF   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   A  s   	t   LanguageOptionc           B   s  e  Z d  Z d Z i` d d 6d d 6d d 6d d	 6d
 d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d  d! 6d" d# 6d$ d% 6d& d' 6d( d) 6d* d+ 6d, d- 6d. d/ 6d0 d1 6d2 d3 6d4 d5 6d6 d7 6d8 d9 6d: d; 6d< d= 6d> d? 6d@ dA 6dB dC 6dD dE 6dF dG 6dH dI 6dJ dK 6dL dM 6dN dO 6dP dQ 6dR dS 6dT dU 6dV dW 6dX dY 6dZ d[ 6d\ d] 6d^ d_ 6d` da 6db dc 6dd de 6df dg 6dh di 6dj dk 6dl dm 6dn do 6dp dq 6dr ds 6dt du 6dv dw 6dx dy 6dz d{ 6d| d} 6d~ d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6Z d   Z d   Z RS(   s   A selection drop-down for language/locale, which yields values
    in the "language[-locale]" format used by RSS, and is restricted
    those languages acceptable to RSS:
    http://backend.userland.com/stories/storyReader$16t   languaget   aft	   Afrikaanss   sq t   Albaniant   eut   Basquet   bet
   Belarusiant   bgt	   Bulgariant   cat   Catalans   zh-cns   Chinese (Simplified)s   zh-tws   Chinese (Traditional)t   hrt   Croatiant   cst   Czecht   dat   Danisht   nlt   Dutchs   nl-bes   Dutch (Belgium)s   nl-nls   Dutch (Netherlands)t   ent   Englishs   en-aus   English (Australia)s   en-bzs   English (Belize)s   en-cas   English (Canada)s   en-ies   English (Ireland)s   en-jms   English (Jamaica)s   en-nzs   English (New Zealand)s   en-phs   English (Phillipines)s   en-zas   English (South Africa)s   en-tts   English (Trinidad)s   en-gbs   English (United Kingdom)s   en-uss   English (United States)s   en-zws   English (Zimbabwe)s    ett   Estoniant   fot   Faeroeset   fit   Finnisht   frt   Frenchs   fr-bes   French (Belgium)s   fr-cas   French (Canada)s   fr-frs   French (France)s   fr-lus   French (Luxembourg)s   fr-mcs   French (Monaco)s   fr-chs   French (Switzerland)t   glt   Galiciant   gdt   Gaelict   det   Germans   de-ats   German (Austria)s   de-des   German (Germany)s   de-lis   German (Liechtenstein)s   de-lus   German (Luxembourg)s   de-chs   German (Switzerland)t   elt   Greekt   hawt   Hawaiiant   hut	   Hungariant   ist	   Icelandict   int
   Indonesiant   gat   Irisht   itt   Italians   it-its   Italian (Italy)s   it-chs   Italian (Switzerland)t   jat   Japaneset   kot   Koreant   mkt
   Macedoniant   not	   Norwegiant   plt   Polisht   ptt
   Portugueses   pt-brs   Portuguese (Brazil)s   pt-pts   Portuguese (Portugal)t   rot   Romanians   ro-mos   Romanian (Moldova)s   ro-ros   Romanian (Romania)t   rut   Russians   ru-mos   Russian (Moldova)s   ru-rus   Russian (Russia)t   srt   Serbiant   skt   Slovakt   slt	   Sloveniant   est   Spanishs   es-ars   Spanish (Argentina)s   es-bos   Spanish (Bolivia)s   es-cls   Spanish (Chile)s   es-cos   Spanish (Colombia)s   es-crs   Spanish (Costa Rica)s   es-dos   Spanish (Dominican Republic)s   es-ecs   Spanish (Ecuador)s   es-svs   Spanish (El Salvador)s   es-gts   Spanish (Guatemala)s   es-hns   Spanish (Honduras)s   es-mxs   Spanish (Mexico)s   es-nis   Spanish (Nicaragua)s   es-pas   Spanish (Panama)s   es-pys   Spanish (Paraguay)s   es-pes   Spanish (Peru)s   es-prs   Spanish (Puerto Rico)s   es-ess   Spanish (Spain)s   es-uys   Spanish (Uruguay)s   es-ves   Spanish (Venezuela)t   svt   Swedishs   sv-fis   Swedish (Finland)s   sv-ses   Swedish (Sweden)t   trt   Turkisht   ukt   Ukranianc         C   sP   t  |  d  sI g  |  _ x. |  j   D] } |  j j |  j |  q% Wn  |  j S(   NRn   (   Rb   Rn   R   R   t	   LANGUAGES(   R   R-   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR     s
    	c         C   s8   t  |  d  s1 |  j j   |  _ |  j j   n  |  j S(   NR   (   Rb   R(  R   R   t   sort(   R   (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR     s    (   RA   R6   RB   Rm   R(  R   R   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   Q  s   

	t   TimeZoneOptionc            B   s  e  Z d  Z d Z d e e j d d  d Z e e j	  d k r[ e j	 d e Z n8 e e j	  d k r e e j	 d d e j	 d Z n  d	 d
 e f d^ d_ d` da db dc dd de df dg dh di dj dk dl dm dn do dp dq dr ds dt du dv dw dx dy dz d{ g Z
 d\   Z d]   Z RS(|   t   timezonet   AAAt   GMTi<   R   i   i    i   t   /RC   s   Use system time zone (%s)s   -12s   Eniwetok, Kwajaleins   -11s   Alofi, Apias   -10s   Avura, Ulupalakuat   HSTs   -9s   Bora Bora, Nomet   AKSTt   AKDTs   -8s   Pacific (Berkeley, Vancouver)t   PSTt   PDTs   -7s   Mountain (Helena, Provo)t   MSTt   MDTs   -6s   Central (Decatur, Repulse Bay)t   CSTt   CDTs   -5s   Eastern (Boca Raton, Seacoast)t   ESTt   EDTs   -4s"   Atlantic (Bishop's Falls, Halifax)t   ASTt   ADTs   -3:30s#   Newfoundland (St. John's, Cow Head)t   NSTt   NDTs   -3s   Montevideo, New Amsterdams   -2s   Belgrano, Fernando de Noronhas   -1s   Azores, Scoresbysundt   0s   Bath, Heklat   BSTs   +1s   Belgrade, Szegeds   +2s   Minsk, Thessalonikis   +3s   Manama, Nakurus   +3:30s   Chabahar, Qoms   +4s   Abu Dabhi, Sevastopols   +4:30s   Kandahar, Mazar-e-Sharifs   +5s   Hyderabad, Turkmenbasys   +5:30s   Chennai, Kathmandus   +6s   Petropavlovsk, Thimphus   +7s   Irkutsk, Xiangkhoangs   +8s    Bandar Seri Begawan, Ulaanbaatart   AWSTs   +9s   Kyoto, Malukus   +9:30t   Darwint   ACSTt   ACDTs   +10s   Saipan, Vladivostokt   AESTt   AEDTs   +11s   Luganville, Noumeas   +12s   Suva, Dunedinc         C   s  t  |  d  s g  |  _ x |  j D] } | d } | ry | d d k rU | d } qy | d d k ry d | d } qy n  d } d } | d r t |  d k r | d | } n |  j | } t |  d	 k r | | d	 } q n  |  j j |  q" Wn  |  j S(
   NRn   i    t   -i   t   +R,  RC   i   i   (   Rb   Rn   t
   TIME_ZONESR   t   DEFAULT_TIMEZONE_ABBRR   (   R   R-   RY   t
   normalAbbrt   daylightAbbr(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   
  s&    	

c         C   s   t  |  d  s |  j d d g |  _ x |  j d D]{ } | d  \ } } | d k rc d | } n  d | k r| | d } n  d	 | k r d
 | } n  |  j j d | | f  q4 Wn  |  j S(   NR   i    i   i   R>  RG  t   :s   :00t   (s   (%s)s	   GMT %s %s(   Rb   RH  R   R   (   R   R-   t   offsett   cities(    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR   *  s    !(   s   -12s   Eniwetok, Kwajalein(   s   -11s   Alofi, Apia(   s   -10s   Avura, UlupalakuaR/  (   s   -9s   Bora Bora, NomeR0  R1  (   s   -8s   Pacific (Berkeley, Vancouver)R2  R3  (   s   -7s   Mountain (Helena, Provo)R4  R5  (   s   -6s   Central (Decatur, Repulse Bay)R6  R7  (   s   -5s   Eastern (Boca Raton, Seacoast)R8  R9  (   s   -4s"   Atlantic (Bishop's Falls, Halifax)R:  R;  (   s   -3:30s#   Newfoundland (St. John's, Cow Head)R<  R=  (   s   -3s   Montevideo, New Amsterdam(   s   -2s   Belgrano, Fernando de Noronha(   s   -1s   Azores, Scoresbysund(   R>  s   Bath, HeklaR-  R?  (   s   +1s   Belgrade, Szeged(   s   +2s   Minsk, Thessaloniki(   s   +3s   Manama, Nakuru(   s   +3:30s   Chabahar, Qom(   s   +4s   Abu Dabhi, Sevastopol(   s   +4:30s   Kandahar, Mazar-e-Sharif(   s   +5s   Hyderabad, Turkmenbasy(   s   +5:30s   Chennai, Kathmandu(   s   +6s   Petropavlovsk, Thimphu(   s   +7s   Irkutsk, Xiangkhoang(   s   +8s    Bandar Seri Begawan, UlaanbaatarR@  (   s   +9s   Kyoto, Maluku(   s   +9:30RA  RB  RC  (   s   +10s   Saipan, VladivostokRD  RE  (   s   +11s   Luganville, Noumea(   s   +12s   Suva, Dunedin(   RA   R6   Rm   RI  R   t   timeR+  t   systemTimezoneR   t   tznameRH  R   R   (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyR*    sT    #  		 (    (    (    (    (    (    (   RB   t
   __author__t   __version__t   __date__t   __copyright__t   __license__R   R   R~   R   R   R4   RP  RH   R2   R   R$   RU   Rd   R   Rz   R   R   R   R   R   R   R   R   R   R*  (    (    (    sf   /home/leonardr/public_html/software/PyCon2003/examples/example2-configurationInterface/IWantOptions.pyt   <module>D   s<   <?%Yz
$h
w