2004年05月28日 星期五 22:47
python-chinese,您好! 请问如何在python中调用*.wav音乐文件,越简单越好; 请问有没有Tkinter和Socket混合编程的程序源代码?谢谢! 致 礼! Abe Ding clcding at slof.com 2004-05-28
2004年05月28日 星期五 23:21
Hollo Abe: import winsound # Play Windows exit sound. winsound.PlaySound("SystemExit", winsound.SND_ALIAS) base: winsound -- Sound-playing interface for Windows PlaySound(sound, flags) Call the underlying PlaySound() function from the Platform API. The sound parameter may be a filename, audio data as a string, or None. Its interpretation depends on the value of flags, which can be a bit-wise ORed combination of the constants described below. If the system indicates an error, RuntimeError is raised. and http://www.speech.kth.se/snack/ Using Snack you can create powerful multi-platform audio applications with just a few lines of code. Snack has commands for basic sound handling, such as playback, recording, file and socket I/O. .... or: Multimedia Services wave -- Read and write WAV files open( file[, mode]) If file is a string, open the file by that name, other treat it as a seekable file-like object. mode can be any of 'r', 'rb' Read only mode. 'w', 'wb' Write only mode. Note that it does not allow read/write WAV files. A mode of 'r' or 'rb' returns a Wave_read object, while a mode of 'w' or 'wb' returns a Wave_write object. If mode is omitted and a file-like object is passed as file, file.mode is used as the default value for mode (the "b" flag is still added if necessary). or: http://www.pygame.org/ 使用 pygame.mixer.music pygame.mixer.music.load(filename) pygame.mixer.music.play(loops=0, startpos=0.0) .... "Tkinter和Socket" 没有关系的哪? Socket 管连接,Tk 管界面 没有什么的哪? /******** [2004-5-28]23:13:15 ; Abe wrote: Abe Ding> python-chinese,您好! Abe Ding> 请问如何在python中调用*.wav音乐文件,越简单越好; Abe Ding> 请问有没有Tkinter和Socket混合编程的程序源代码?谢谢! Abe Ding> 致 Abe Ding> 礼! Abe Ding> Abe Ding Abe Ding> clcding at slof.com Abe Ding> 2004-05-28 Abe Ding> _______________________________________________ Abe Ding> python-chinese list Abe Ding> python-chinese at lists.python.cn Abe Ding> http://python.cn/mailman/listinfo/python-chinese ********************************************/ -- Free as in Freedom Zoom.Quiet #=========================================# ]Time is unimportant, only life important![ #=========================================# sender is the Bat!2.02 CE
Zeuux © 2024
京ICP备05028076号