
Qc           @   s  d  Z  d d l m Z e d d d d d l m Z m Z m Z m Z d d l m	 Z	 d d l m
 Z
 d d	 l m Z d d
 l m Z d d l m Z m Z m Z m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l Z d d l Z d d l Z d d l Td d l Z d d l Z d d l Z d d l Z d d d d d d d d d g	 Z d a d   Z d   Z  d   Z! d   Z" d  d d!  Z$ d" d# d d d$  Z% d" d% d d d&  Z& d d d d d' d(  Z' e	 j(   j) Z* e* d d) e* d* d) e* d d) e* d+ d) f Z* d, Z+ d dE d-     YZ, d. Z- d* Z. d Z/ d+ Z0 d) Z1 d/ Z2 d0 Z3 d1 Z4 d2 Z5 d3 Z6 d4 Z7 d5 Z8 d6 Z9 d7 Z: d8 Z; d9   Z< d:   Z= d d d* d* d* e- d;  Z> d<   Z? d=   Z@ e@ aA d>   ZB d d d d d d d d d d d d e@ d d d d d?  ZC d d d d d d d d d d d d e@ d d d d d@  ZD d d d d d d d d d d d e@ d d d dA  ZE dB   ZF eG dC k ry eF   WqeH k
 re$ dD  qXn  d S(F   s  Easy to use dialogs.

Message(msg) -- display a message and an OK button.
AskString(prompt, default) -- ask for a string, display OK and Cancel buttons.
AskPassword(prompt, default) -- like AskString(), but shows text as bullets.
AskYesNoCancel(question, default) -- display a question and Yes, No and Cancel buttons.
GetArgv(optionlist, commandlist) -- fill a sys.argv-like list using a dialog
AskFileForOpen(...) -- Ask the user for an existing file
AskFileForSave(...) -- Ask the user for an output file
AskFolder(...) -- Ask the user to select a folder
bar = Progress(label, maxvalue) -- Display a progress bar
bar.set(value) -- Set value
bar.inc( *amount ) -- increment value by amount (default=1)
bar.label( *newlabel ) -- get or set text label.

More documentation in each function.
This module uses DLOG resources 260 and on.
Based upon STDWIN dialogs with the same names and functions.
i(   t   warnpy3ks*   In 3.x, the EasyDialogs module is removed.t
   stackleveli   (   t   GetNewDialogt   SetDialogItemTextt   GetDialogItemTextt   ModalDialog(   t   Qd(   t	   QuickDraw(   t   Dialogs(   t   Windows(   t   Dlgt   Wint   Evtt   Events(   t   Ctl(   t   Controls(   t   Menu(   t   AEN(   t   *t   Messaget	   AskStringt   AskPasswordt   AskYesNoCancelt   GetArgvt   AskFileForOpent   AskFileForSavet	   AskFoldert   ProgressBari    c           C   s$   t  r
 d  St j d d d t  d  S(   Nt   DLOGi  s   dialogs.rsrc(   t   _initializedt   macresourcet   needt   __name__(    (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyt   _initialize1   s     c           C   s   t  j d  d S(   s.   Make sure the application is in the foregroundiN(   R   t   AEInteractWithUser(    (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyt	   _interact6   s    c         C   s1   d |  k r- t  j t  j |  d  d  }  n  |  S(   Ns   s   
(   t   stringt   joint   split(   t   text(    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyt   cr2lf:   s    !c         C   sT   d |  k r- t  j t  j |  d  d  }  n  t |   d k rP |  d  d }  n  |  S(   Ns   
s   i   s   (   R$   R%   R&   t   len(   R'   (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyt   lf2cr?   s
    !i  c         C   s   t    t   t | d  } | s4 d G| Gd GHd S| j d  } t | t |    | d k	 r | j d  } | j |  n  | j d  | j	   | j
   j   x t d  } | d k r d Sq d S(   s   Display a MESSAGE string.

    Return when the user clicks the OK button or presses Return.

    The MESSAGE string can be at most 255 characters long.
    is.   EasyDialogs: Can't get DLOG resource with id =s    (missing resource file?)Ni   i   (   R!   R#   R   t   GetDialogItemAsControlR   R*   t   Nonet   SetControlTitlet   SetDialogDefaultItemt   AutoSizeDialogt   GetDialogWindowt
   ShowWindowR   (   t   msgt   idt   okt   dt   ht   n(    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyR   F   s$    
t    i  c         C   sf  t    t   t | d  } | s4 d G| Gd GHd S| j d  } t | t |    | j d  } t | t |   | j d d d  | d k	 r | j d	  } | j |  n  | d k	 r | j d
  } | j |  n  | j	 d	  | j
 d
  | j   | j   j   xJ t d  } | d	 k rO| j d  } t t |   S| d
 k rd Sqd S(   sz  Display a PROMPT string and a text entry field with a DEFAULT string.

    Return the contents of the text entry field when the user clicks the
    OK button or presses Return.
    Return None when the user clicks the Cancel button.

    If omitted, DEFAULT is empty.

    The PROMPT and DEFAULT strings, as well as the return value,
    can be at most 255 characters long.
    is.   EasyDialogs: Can't get DLOG resource with id =s    (missing resource file?)Ni   i   i    i  i   i   (   R!   R#   R   R+   R   R*   t   SelectDialogItemTextR,   R-   R.   t   SetDialogCancelItemR/   R0   R1   R   R(   R   (   t   promptt   defaultR3   R4   t   cancelR5   R6   R7   (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyR   a   s8    
 i  c   
      C   s  t    t   t | d  } | s4 d G| Gd GHd S| j d  } t | t |    | j d  } d t |  } t | t t	 |  | j
 d d d	  t j | j   | t  | d k	 r | j d
  } | j |  n  | d k	 r
| j d  } | j |  n  | j t j  | j t j  | j   | j   j   xP t d  }	 |	 d
 k r| j d  } t t | t t	   S|	 d k rGd SqGd S(   s  Display a PROMPT string and a text entry field with a DEFAULT string.
    The string is displayed as bullets only.

    Return the contents of the text entry field when the user clicks the
    OK button or presses Return.
    Return None when the user clicks the Cancel button.

    If omitted, DEFAULT is empty.

    The PROMPT and DEFAULT strings, as well as the return value,
    can be at most 255 characters long.
    is.   EasyDialogs: Can't get DLOG resource with id =s    (missing resource file?)Ni   i   s   i    i  i   i   (   R!   R#   R   R+   R   R*   R)   t   SetControlDatat   kControlEditTextPartt   kControlEditTextPasswordTagR9   R   t   SetKeyboardFocusR0   R,   R-   R.   R   R4   R:   R=   R/   R1   R   R(   t   GetControlData(
   R;   R<   R3   R4   R=   R5   R6   t   pwdt   bulletsR7   (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyR      s<    
 i  c   	      C   s  t    t   t | d  } | s4 d G| Gd GHd S| j d  } t | t |    | d k	 r | d k r~ | j d  q | j d  } | j |  n  | d k	 r | d k r | j d  q | j d  } | j |  n  | d k	 r+| d k r| j d	  q+| j d	  } | j |  n  | j	 d	  | d
 k rT| j
 d  n8 | d k rp| j
 d  n | d k r| j
 d	  n  | j   | j   j   xO t d  } | d
 k r| S| d k rd
 S| d k rd S| d	 k rd Sqd S(   sx  Display a QUESTION string which can be answered with Yes or No.

    Return 1 when the user clicks the Yes button.
    Return 0 when the user clicks the No button.
    Return -1 when the user clicks the Cancel button.

    When the user presses Return, the DEFAULT value is returned.
    If omitted, this is 0 (No).

    The QUESTION string can be at most 255 characters.
    is.   EasyDialogs: Can't get DLOG resource with id =s    (missing resource file?)Ni   R8   i   i   i   i   i    (   R!   R#   R   R+   R   R*   R,   t   HideDialogItemR-   R:   R.   R/   R0   R1   R   (	   t   questionR<   t   yest   noR=   R3   R5   R6   R7   (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyR      sT    
    i   i   i   t   indec           B   s\   e  Z d  d d d d  Z d   Z d d  Z d   Z d   Z d d	  Z d
 d  Z	 RS(   s
   Working...i    R8   i  c         C   s   d  |  _ d  |  _ t   t | d  |  _ |  j j   |  _ |  j |  |  j |  |  j d |  |  j j	   |  j j
   |  j j   d  S(   Nii    (   R,   t   wR5   R!   R   R0   t   labelt   titlet   setR/   R1   t
   DrawDialog(   t   selfRL   t   maxvalRK   R3   (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyt   __init__   s    		c         C   s6   |  j  r& |  j  j   |  j  j   n  |  `  |  ` d  S(   N(   RJ   t   BringToFrontt
   HideWindowR5   (   RO   (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyt   __del__  s
    	c         C   s!   |  j  j   |  j  j |  d S(   s*   title(text) - Set title of progress windowN(   RJ   RR   t	   SetWTitle(   RO   t   newstr(    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyRL     s    c         G   sO   |  j  j   | r) t | d  |  _ n  |  j j d  } t | |  j  d S(   s&   label(text) - Set text in progress boxi    i   N(   RJ   RR   R*   t   _labelR5   R+   R   (   RO   RV   t   text_h(    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyRK     s
    c         C   s  |  j  } | d k r( t j |  j  nm | d k rQ t | | d  } d } n  t |  } t |  } |  j j d  } | j |  | j |  t	 j
 t j d  \ } } | r| \ } } } }	 }
 t j |	  d } t j |  rWt j |  } | d r| d |  j k r| d d k r|  j j   d  |  _ d  |  _ t |  qq| d k ry|  j j |	 t  qt j |  n  d  S(   Ni    i  g    @i   i   ii   (   RP   R   t   IdleControlsRJ   t   intR5   R+   t   SetControlMaximumt   SetControlValueR   t   WaitNextEventR   t	   mDownMaskR   t
   FindWindowR
   t   IsDialogEventt   DialogSelectRS   R,   t   KeyboardInterruptt
   DragWindowt   screenboundst   MacOSt   HandleEvent(   RO   t   valueRP   t   progbart   readyt   evt   whatR2   t   whent   wheret   modt   partt   ds(    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyt   _update   s2    		-		c         C   s   | d k	 r_ | |  _ |  j j d  } | d k rI | j d t d  q_ | j d t d  n  | d k  rt d } n | |  j k r |  j } n  | |  _ |  j |  d S(   s&   set(value) - Set progress bar positioni   i    s   t    N(   R,   RP   R5   R+   R>   t#   kControlProgressBarIndeterminateTagt   curvalRq   (   RO   Rg   t   maxt   bar(    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyRM   A  s    			i   c         C   s   |  j  |  j |  d S(   s*   inc(amt) - Increment progress bar positionN(   RM   Rt   (   RO   R7   (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyt   incQ  s    N(
   R    t
   __module__RQ   RT   RL   RK   Rq   R,   RM   Rw   (    (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyR      s   			!i	  i   i   i   i   i	   i
   i   i   i   i   c         C   s   |  j  t j t j  } t j |  } xs | D]k } t |  t d  k rY | d } n | } | d d k s | d d k r | d  } n  | j |  q. W|  j d  |  j	 t
 |  d  d  S(   Ni    it   =t   :i   (    (   t   GetControlData_HandleR   t   kControlMenuPartt    kControlPopupButtonMenuHandleTagR   t   as_Menut   typet
   AppendMenut   SetControlMinimumR[   R)   (   t   controlt   itemst   mhandlet   menut   itemRK   (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyt   _setmenuz  s     c         C   s  | d k  s | t  |  k r, t j   d  S| | } t |  t d  k r t  |  d k rm | d } q t  |  d k r | d } q d } n d } |  j t  } | r t  |  d k r | d  d } n  t j | |  d } t |  t d  k r| d } n | } | d d	 k s4| d d
 k r=d } n  |  j t  } t j | d  | r|  j	 t  |  j
 t d d  n |  j t  d  S(   Ni    i   i   i   iR8   i   s   ...Ry   Rz   (    (    (   R)   Re   t   SysBeepR   R+   t   ARGV_OPTION_EXPLAINR
   R   t   ARGV_OPTION_VALUEt   ShowDialogItemR9   RE   (   R5   t
   optionlistt   idxt   optiont   helpR6   t   hasvalueRK   (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyt   _selectoption  s6    

	 	c         C   sH  t    t   t | d  } | s4 d G| Gd GHd  S|  rc t | j t  |   t | |  d  n | j t  j   | r t | j t  |  t	 | d  t	 d  k r
t
 | d  d k r
| d d } | j t  } t j | |  q
n | j t  j   | s&| j t  j   n  | sB| j t  j   n  | s^| j t  j   n  | j t  | j t  | j   j   | j   t t d  rt j d d  }	 n  zhx>g  }
 t d   } | t k rPnP| t k rt  n;| t k r+| j t  j   d } t | |  |  n| t k r:n| t  k rY| j t  j   d } d | k o|t
 |   k  n rL|  | } t	 |  t	 d  k r| d } n  | d d k s| d d k r| d  } | j t  } t j! |  } n d	 } t
 |  d k r d
 | } n
 d | } | g }
 | rV|
 j" |  qVq.t j#   n| t k r| j t  j   d } d | k ot
 |  k  n r.t	 | |  t	 d  k r.t
 | |  d k r.| | d } | j t  } t j | |  q.n)| t$ k r| j t  j   d } d | k oGt
 |  k  n r| | } t	 |  t	 d  k r{| d } n  | g }
 q.t j#   n | t k rt%   } | r.| g }
 q.np | t k rt&   } | r.| g }
 q.nF | t k rt'   } | r.| g }
 q.n | t( k r!n t) d |  x |
 D] } d | k s_d | k s_d | k rnt* |  } n  | j t(  } t! |  } | r| d d k r| d } n  | | } | d d k r| d } n  t | |  | j+ t( d d  q5Wq| j t(  } t! |  } t, j- |  } g  } x | r| d } | d =| d d k rx? | d d k r| syt) d  n  | d | d } | d =qWW| d d !} n  | d d k rx? | d d k r| st) d  n  | d | d } | d =qW| d d !} n  | j" |  q-W| SWd  t t d  r@t j |	   n  ~ Xd  S(   Nis.   EasyDialogs: Can't get DLOG resource with id =s    (missing resource file?)i    i   t   SchedParamsRy   Rz   R8   t   -s   --s   Unknown dialog item %dt   "t   't    i  s   Unterminated quoted argument(    (    (    (    (.   R!   R#   R   R   R+   t   ARGV_OPTION_GROUPR   t   DeactivateControlt   ARGV_COMMAND_GROUPR   R)   t   ARGV_COMMAND_EXPLAINR
   R   t   ARGV_ADD_OLDFILEt   ARGV_ADD_NEWFILEt   ARGV_ADD_FOLDERR.   t   ARGV_ITEM_OKR:   t   ARGV_ITEM_CANCELR0   R1   RN   t   hasattrRe   R   R   R,   t
   SystemExitt   GetControlValueR   t   ARGV_OPTION_ADDR   t   appendR   t   ARGV_COMMAND_ADDR   R   R   t   ARGV_CMDLINE_DATAt   RuntimeErrort   reprR9   R$   R&   (   R   t   commandlistt
   addoldfilet
   addnewfilet	   addfolderR3   R5   R   R6   t   appswt   stringstoaddR7   R   R   Rg   t   stringtoaddt   commandt   pathnamet   oldstrt   tmplistt   newlistR   (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyR     s    2
	"
 

	>"
			$
	
c   	   	   K   s   d d  l  } d d  l } d d  l } x. | j   D]  } | | d  k r1 | | =q1 q1 Wd | k rn |  | d <n  d | k r't | d | j j  r'| d } t | | j j	  r | j j
 | j j | j  | d <q't | | j j  s| j j |  } n  | j j
 | j j | j  | d <n  d | k rt | d | j j  r| d } d | k r}d | k r}| d } n  d t j d d	 t |   } x | D] } | | } qW| j j |  | d <n  t } d
 | k r| d
 } | d
 =n  | | f S(   Nit   dialogOptionFlagst   defaultLocationt   typeListt   TEXTt       t   Pytht   hhi    t   wanted(   s       (   t   Carbon.AppleEventst	   Carbon.AEt   Carbon.Filet   keysR,   t
   isinstanceR   t   AEDesct   Filet   FSSpect   AECreateDesct   AppleEventst   typeFSSt   datat   FSReft	   typeFSReft   Rest   ResourceTypet   structt   packR)   t   Handlet   str(	   t   dftflagst   argst   Carbont   kR   R   R   R   t   tpwanted(    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyt   _process_Nav_args?  s>    
		&

c         C   s   d  S(   N(    (   R2   R   (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyt   _dummy_Nav_eventprocc  s    c         C   s%   t  } |  d  k r t }  n  |  a  | S(   N(   t   _default_Nav_eventprocR,   R   (   t   proct   rv(    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyt   SetDefaultEventProch  s
    	c      $   C   s  d } t  | d | d | d | d | d | d | d | d	 |	 d
 |  d |
 d | d | d | d | d | d | d | \ } } t   y t j |  } d } Wn6 t j k
 r } | d d k r t j |  n  d SX| j s | j r d St | t	 j
 j  r| | j d  St | t	 j
 j  r;| | j d  St | t  ra| | j d j    St | t  r| | j d j   d  St d t |   d S(   s   Display a dialog asking the user for a file to open.

    wanted is the return type wanted: FSSpec, FSRef, unicode or string (default)
    the other arguments can be looked up in Apple's Navigation Services documentationiV   t   versionR   R   t   locationt
   clientNamet   windowTitlet   actionButtonLabelt   cancelButtonLabelt   messaget   preferenceKeyt   popupExtensiont	   eventProct   previewProct
   filterProcR   R   t   multiplei   i    it   utf8s'   Unknown value for argument 'wanted': %sN(   R   R#   t   Navt   NavChooseFilet   errorR,   t   validRecordt	   selectiont
   issubclassR   R   R   t   selection_fsrR   R   t   as_pathnamet   unicodet	   TypeErrorR   (   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   t   default_flagsR   R   t   rrt   goodt   arg(    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyR   p  s6    !
c      $   C   s
  d } t  | d | d | d | d | d | d | d | d	 |	 d
 | d |  d |
 d | d | d | d | d | d | \ } } t   y t j |  } d } Wn6 t j k
 r } | d d k r t j |  n  d SX| j s | j r d St | t	 j
 j  rt d  n  t | t	 j
 j  r6| | j d  St | t t f  r| j d j   \ } } } t	 j
 j | | d f  } t	 j
 j |  } | j   } t | d  j d  } t j j | |  } t | t  rt | d  S| |  St d t |   d S(   s   Display a dialog asking the user for a filename to save to.

    wanted is the return type wanted: FSSpec, FSRef, unicode or string (default)
    the other arguments can be looked up in Apple's Navigation Services documentationi   R   R   R   R   R   R   R   R   t   savedFileNameR   R   R   R   t   fileTypet   fileCreatorR   R   i   i    is*   Cannot pass wanted=FSRef to AskFileForSaveR8   t   macromanR   s'   Unknown value for argument 'wanted': %sN(   R   R#   R   t
   NavPutFileR   R,   R   R   R   R   R   R   R   R   R   R   t   as_tuplet   FSRefMakePatht   encodet   ost   pathR%   R   (   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   t   vrefnumt   diridt   namet
   pardir_fsst
   pardir_fsrt   pardir_patht	   name_utf8t   fullpath(    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyR     sB    

c          C   s  d } t  | d | d | d | d | d | d | d | d	 | d
 |  d |	 d |
 d | d | d | d | \ } } t   y t j |  } d } Wn6 t j k
 r } | d d k r t j |  n  d SX| j s | j r d St | t	 j
 j  r	| | j d  St | t	 j
 j  r/| | j d  St | t  rU| | j d j    St | t  r~| | j d j   d  St d t |   d S(   s   Display a dialog asking the user for select a folder.

    wanted is the return type wanted: FSSpec, FSRef, unicode or string (default)
    the other arguments can be looked up in Apple's Navigation Services documentationi   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   i   i    iR   s'   Unknown value for argument 'wanted': %sN(   R   R#   R   t   NavChooseFolderR   R,   R   R   R   R   R   R   R   R   R   R   R   R   R   (   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyR     s6    
c          C   s  d d  l  }  t d  d< d= d> d? f } d@ dA f } t d | d | d d  } t d d j |   x- t t |   D] } d | | | f GHqy Wt d  } t d d d d d } | d k rt d d  } t d | | d d  } | st d! |  q"t d" | | f  n d# } t	 d$ d% | d& t
 j j  } t d' |  t d& t
 j j d( d) |  } t d* | j    t   } t d+ |  dB }	 t d0 d d1 d2 }
 z t t d3  rt j d4 d  } n  x+ t d5  D] } |
 j   |  j d6  qW|
 j d d7  xZ t d7  D]L } |
 j |  |  j d6  | d8 d k r&|
 j |	 | d8 d9  q&q&W|
 j d:  |  j d;  Wd  ~
 t t d3  rt j |   n  Xd  S(C   Nis   Testing EasyDialogs.t   vt   Verboset   verboses   Verbose as long options   flags=s   Valued options   f:s   Short valued optiont   starts   Start somethingt   stops   Stop somethingR   R   R   i    s   Command line: %sR   s   arg[%d] = %rs   Do you want to proceed?s   Do you want to identify?RG   t   IdentifyRH   t   Nos   Enter your first namet   Joes   Okay %s, tell us your nicknameR=   R,   s   %s has no secret nicknames4   Hello everybody!!
The secret nickname of %s is %s!!!t	   AnonymousR   s   Gimme a file, %sR   s   rv: %sR   s   %s.txts   rv.as_pathname: %ss   Folder name: %ss   Working Hard...s   Hardly Working...s   So far, so good!s   Keep on truckin's   Progress, progress...RK   s   Ramping up...R   i   i   g?id   i
   i   s   Done.g      ?(   R  R  (   s   verboses   Verbose as long option(   s   flags=s   Valued option(   s   f:s   Short valued option(   s   starts   Start something(   s   stops   Stop something(   s   Working Hard...s   Hardly Working...s   So far, so good!s   Keep on truckin'(   t   timeR   R   R%   t   rangeR)   R   R   R   R   R   R   R   R   R   R   R   R   R   Re   R   t   xrangeRw   t   sleepRM   RK   (   R  R   R   t   argvt   iR4   t   st   s2R   R'   Rv   R   (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyt   test  sX    
	 
 t   __main__s   Operation Canceled.(    (I   t   __doc__t   warningsR    t
   Carbon.DlgR   R   R   R   R   R   R   R   R	   R
   R   R   R   R   R   R   R   R   Re   R$   t   Carbon.ControlAccessorR   R   R   t   syst   __all__R   R!   R#   R(   R*   R,   R   R   R   R   t   GetQDGlobalsScreenBitst   boundsRd   Rs   R   t   ARGV_IDR   R   R   R   R   R   R   R   R   R   R   R   t   ARGV_CMDLINE_GROUPR   R   R   R   R   R   R   R   R   R   R   R  R    Rb   (    (    (    sA   /Users/tom/newbuild/install/lib/python2.7/plat-mac/EasyDialogs.pyt   <module>   s   ""
					*,@W		"	$			#+#	2