³ò
ÖïIFc           @   sœ  d  Z  d Z d Z y e Wn d& \ Z Z n Xyž d d k Z d d k Z d d k Z d d k Z d d k	 Z	 e i
 i e i
 i e	 i e i ƒ  ƒ d d d	 ƒ ƒ e e e i
 ƒ Z d d
 k l Z l Z Wn1 y e i i d e ƒ Wn e GHn X‚  n Xe i
 i e i d ƒ d Z e i
 i e ƒ d Z e i d ƒ i e ƒ i ƒ  Z d „  Z d „  Z d „  Z d d k Td Z  d Z! d Z" d Z# d Z$ d Z% d Z& d Z' d Z( d Z) d Z* d Z+ d Z, d Z- d Z. d „  Z/ d „  Z0 d  „  Z1 e2 d! j ož e Z3 e i d Z4 e e j oR yD e5 e4 ƒ o3 e6 d" e4 d ƒ o e i d Z3 e i d# Z4 n WqlqlXn e6 d$ e3 e e7 e4 ƒ ƒ f ƒ p d% GHn d S('   s÷   Cygwin replacement for winsound module, which ought to be here but wasn't

   winsound.py defines constants and provides a test routine
    when invoked directly
   _winsound.dll implements Beep(frequency, duration) and
    PlaySound(sound, flags)s5  
    winsound - python interface to Windows audio services
    Copyright (C) 2004  John Comeau <jc@jcomeau.com>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    s7   Not all needed libraries found, upgrade or check path: i   i    iÿÿÿÿNi   t   libt   python(   t   gplt	   jclicenses   %s
s   [0-9A-Za-z]+c          G   s   t  S(   N(   t   False(   t   whatever(    (    s   winsound.pyt
   DebugPrint5   s    c          G   s´   |  \ } } t  | ƒ t i j o t | ƒ } n t t d ƒ o | i | ƒ Sn^ d } xP t d t | ƒ ƒ D]9 } | | | } | t | ƒ d j o | | } qo qo W| Sd S(   s   for pythons without str.joint   joint    i    i   N(	   t   typet   typest
   StringTypet   evalt   hasattrt   strR   t   ranget   len(   t   argst   stringt   arrayt   joinedt   index(    (    s   winsound.pyR   8   s    & c          G   sg   |  \ } } t  | ƒ p
 d } n t d d ƒ o | i | ƒ Sn  t i t i | ƒ ƒ i | ƒ Sd S(   s   for pythons without str.splitR   t   splitN(   R   t   NoneR   R   t   ret   compilet   escape(   R   R   t   string_to_split(    (    s   winsound.pyR   F   s
    (   t   *l   @ l   0 l    l     l    l      l   € l    l      l    l    l    l     c          G   sG   x@ |  D]8 } t  | t t Bƒ p t i i d d | f ƒ q q Wd S(   s“   play audio file[s]

    like program of same name on older (and maybe some recent?) linux
    distributions, play WAV files on default audio devices   %s: %s
s   Could not play file: N(   t	   PlaySoundt   SND_FILENAMEt   SND_NODEFAULTt   syst   stderrt   write(   R   t   file(    (    s   winsound.pyt   playc   s     c           C   s   t  d d ƒ t d t ƒ d S(   så   quick test to see that module is working

   first it tries the Beep service with the A above middle C for 1/2 second.
   then it tries to play a sound file. If the file doesn't exist, it should
   make the default sound "boing".i¸  iô  s   test.wavN(   t   BeepR   R   (    (    (    s   winsound.pyt   demom   s    c           C   s   t  i i d t ƒ d S(   sw   This is a module, symlink to the routine you want to use.

    for example, ln -s ~/src/winsound/winsound.py ~/bin/plays   %s
N(   R    R!   R"   t   __doc__(    (    (    s   winsound.pyt   winsoundw   s    t   __main__s   type(%s) == types.FunctionTypei   s   %s%sR   (   i   i    (8   R'   t	   Copyrightt   errormessaget   TrueR   R    t   osR
   R   t   pwdt   patht   appendR   t   getpwuidt   geteuidt   reprt   com.jcomeauR   R   R!   R"   R   t   argvt   myselft   splitextt   commandR   t   searcht   groupt   originalselfR   t	   _winsoundt   MB_ICONASTERISKt   MB_ICONEXCLAMATIONt   MB_ICONHANDt   MB_ICONQUESTIONt   MB_OKt	   SND_ALIASt   SND_APPLICATIONt	   SND_ASYNCR   t   SND_LOOPt
   SND_MEMORYR   t
   SND_NOSTOPt
   SND_NOWAITt	   SND_PURGER$   R&   R(   t   __name__t   functionR   R   R   t   tuple(    (    (    s   winsound.pys   <module>   sf   <5				

	
	
	"",