Afficher un message
Vieux 23/08/2007, 20h01   #8
firelink.east@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Lire un sons en python

On 23 août, 13:30, Jerome <jer...@nospam.com> wrote:
> Bonjour
>
> -snip-
>
> firelink.e...@gmail.com wrote:
> > Au fait comment est ce que je peux lister
> > toute les fonctions d'un module en python ?

>
> >>> import string
> >>> dir(string)


merci


voila j'ai quasi fini le soft , reste juste quelque détails :


j'aimerais à la fois mettre les wav dans un répértoire , séparer du
script . et à la fois que le script puisse s'éxecuter autant sous
Linux que windows et Mac os x .

le problème vient du fait que la syntaxe des répértoire diffère sous
windows de Linux et Mac os x .(slash et backslash ) .

j'aimerais mettre un bouton exit en tout en dessous , j'avais créer
une nouvelle frame , mais le bouton se met toujours a coté . (right)
au lieu d en bas bien que j'ai defini la nouvelle frame avec side =
BOTTOM

quelqu'un a t-il déjà utilisé Py2exe ? pour transformer un py
en .exe

même chose pour Mac os x ( Py2app )

Même chose pour Linux (pour gerer les dependance ) autopackage peut
etre ?

voici le code :

import sys
from Tkinter import *
root = Tk()
import tkSnack
tkSnack.initializeSnack(root)


def Aaah():
AhhSound = tkSnack.Sound(load='/home/me/resource/crowd.exe.remake/
wav/crowd.exe.remake.0.2.Aaahh.wav')
AhhSound.play()
def Oohh():
OohhSound = tkSnack.Sound(load='/home/me/resource/crowd.exe.remake/
wav/crowd.exe.remake.0.2.Oohh.wav')
OohhSound.play()

def BOo():
BOoSound = tkSnack.Sound(load='/home/me/resource/crowd.exe.remake/
wav/crowd.exe.remake.0.1.BOo.wav')

BOoSound.play()

def WOW():
WOWsound = tkSnack.Sound(load='/home/me/resource/crowd.exe.remake/
wav/crowd.exe.remake.0.1.WOW.wav')
WOWsound.play()

def Clapping():
ClappingSound = tkSnack.Sound(load='/home/me/resource/
crowd.exe.remake/wav/crowd.exe.remake.0.1.Clapping.wav')
ClappingSound.play()

def Laughing():
LaughingSound = tkSnack.Sound(load='/home/me/resource/
crowd.exe.remake/wav/crowd.exe.remake.0.1.laughing.wav')
LaughingSound.play()

def Huh():
HuhSound = tkSnack.Sound(load='/home/me/resource/crowd.exe.remake/
wav/crowd.exe.remake.0.1.Huh.wav')
HuhSound.play()
def Yeah():
YeahSound = tkSnack.Sound(load='/home/me/resource/crowd.exe.remake/
wav/crowd.exe.remake.0.1.Yeah.wav')
YeahSound.play()

def Cool():
YeahSound = tkSnack.Sound(load='/home/me/resource/crowd.exe.remake/
wav/crowd.exe.remake.0.1.Yeah.wav')
YeahSound.play()


root.title("Foule controle")
root.geometry("157x178")
f1 = Frame(root, width=78 , height= 138, bg="",bd=4 )
f1.pack(side = LEFT)
bou1=Button(f1, width =6,height=1, text='Aaah',command=Aaah)
bou1.pack()
bou2 =Button(f1, width =6,height=1, text='BoOOoo',command=BOo)
bou2.pack()
bou3=Button(f1, width =6,height=1,text='Clapping',command = Clapping)
bou3.pack()
bou4=Button(f1, width =6,height=1,text='Huh ? ',command = Huh)
bou4.pack()

f2 = Frame(root, width=78 , height= 138, bg="")
f2.pack(side =LEFT)


bou5=Button(f2, width =6,height=1,text='Oohh', command = Oohh)
bou5.pack()

bou6=Button(f2, width =6,height=1, text='WOW !',command = WOW)
bou6.pack()
bou7=Button(f2, width =6,height=1, text='Laughing',command = Laughing)
bou7.pack()
bou8=Button(f2, width =6,height=1,text='Yeah',command=Yeah)
bou8.pack()


# frame pour accueillir le bouton exit
f3 = Frame(fen, width=145, height=50 )

f3.pack(side = BOTTOM)

# def Cool , encore besoin du code pour l exit
bou9=Button(f3, text='exit', command=Cool)
bou9.pack(side = BOTTOM)


root.mainloop()





  Réponse avec citation
 
Page generated in 0,06350 seconds with 9 queries