Python_2  1.0
Classes | Functions | Variables
_10_tkmpg123 Namespace Reference

tkmpg123 - keep mpg123 and Tk happily eventing w/o blocking. More...

Classes

class  playerState
 

Functions

def init (loc)
 
def createMenu (loc)
 
def buildPlayer (loc, ivol)
 
def pause ()
 
def kill (pid)
 
def stop ()
 
def preferences ()
 
def click (event)
 
def about (e=None)
 
def play_file ()
 
def play_url (e=None)
 
def readm3u (m3u)
 
def aplay (song)
 
def clear (e=None)
 
def getUser ()
 
def list_entry_clicked (event)
 
def fini (msg="")
 
def ctm (s)
 
def start_play (song="")
 
def main (argv=None)
 

Variables

int pid = 0
 
bool state = False
 
string csong = ""
 
 mw = Tk()
 
 c = Canvas()
 

Detailed Description

tkmpg123 - keep mpg123 and Tk happily eventing w/o blocking.

Author
Paulo Roma
Since
2009/08/18

Function Documentation

◆ about()

def _10_tkmpg123.about (   e = None)
Shows usage messages.

Referenced by _09_tkhanoi.init().

◆ aplay()

def _10_tkmpg123.aplay (   song)
Saves the song in the Dialog Box and plays it.

References readm3u().

Referenced by main(), play_file(), play_url(), and readm3u().

◆ buildPlayer()

def _10_tkmpg123.buildPlayer (   loc,
  ivol 
)
Builds the skin of our player.

Referenced by main().

◆ clear()

def _10_tkmpg123.clear (   e = None)
Clears the Listbox.

Referenced by _05b_dns.main(), and _06_ping.main().

◆ click()

def _10_tkmpg123.click (   event)
Treats the mouse click event.

◆ createMenu()

def _10_tkmpg123.createMenu (   loc)

Referenced by main().

◆ ctm()

def _10_tkmpg123.ctm (   s)
Returns the elapsed time.

Referenced by list_entry_clicked().

◆ fini()

def _10_tkmpg123.fini (   msg = "")
Finishes the player.

References stop().

Referenced by main().

◆ getUser()

def _10_tkmpg123.getUser ( )
Returns the user running the player.

Referenced by init().

◆ init()

def _10_tkmpg123.init (   loc)

References getUser().

Referenced by main().

◆ kill()

def _10_tkmpg123.kill (   pid)
kill function for Win32

Referenced by stop().

◆ list_entry_clicked()

def _10_tkmpg123.list_entry_clicked (   event)
Plays the current selection.

References ctm(), and start_play().

◆ main()

def _10_tkmpg123.main (   argv = None)
Main program.

References aplay(), buildPlayer(), createMenu(), fini(), and init().

◆ pause()

def _10_tkmpg123.pause ( )
Pauses the song.

References start_play(), and stop().

◆ play_file()

def _10_tkmpg123.play_file ( )
Creates a tkFileDialog for selecting a song.

References aplay().

◆ play_url()

def _10_tkmpg123.play_url (   e = None)
Enters a given URL for being played.

References aplay().

◆ preferences()

def _10_tkmpg123.preferences ( )
Sets the player preferences.

◆ readm3u()

def _10_tkmpg123.readm3u (   m3u)
"Reads all of the songs in a m3u file.

References aplay().

Referenced by aplay().

◆ start_play()

def _10_tkmpg123.start_play (   song = "")
Starts a process for playing the given song.

References stop().

Referenced by list_entry_clicked(), and pause().

◆ stop()

def _10_tkmpg123.stop ( )
Stops the song, by killing the player process.

References kill().

Referenced by fini(), pause(), and start_play().

Variable Documentation

◆ c

_10_tkmpg123.c = Canvas()

◆ csong

string _10_tkmpg123.csong = ""

◆ mw

_10_tkmpg123.mw = Tk()

◆ pid

int _10_tkmpg123.pid = 0

◆ state

bool _10_tkmpg123.state = False

Referenced by _07_alarme_class.main().