Package flumotion :: Package common :: Module mimetypes
[hide private]

Module mimetypes

source code

convert mimetypes or launch an application based on one


Version: $Rev: 6964 $

Functions [hide private]
 
mimeTypeToExtention(mimeType)
Converts a mime type to a file extension.
source code
 
launchApplicationByUrl(url, mimeType)
Launches an application in the background for displaying a url which is of a specific mimeType
source code
Variables [hide private]
  _ASSOCSTR_COMMAND = 1
  _ASSOCSTR_EXECUTABLE = 2
  _EXTENSIONS = {'application/ogg': 'ogg', 'audio/mpeg': 'mp3', ...
Function Details [hide private]

mimeTypeToExtention(mimeType)

source code 

Converts a mime type to a file extension.

Parameters:
  • mimeType - the mime type
Returns:
file extenion if found or data otherwise

launchApplicationByUrl(url, mimeType)

source code 

Launches an application in the background for displaying a url which is of a specific mimeType

Parameters:
  • url - the url to display
  • mimeType - the mime type of the content

Variables Details [hide private]

_EXTENSIONS

Value:
{'application/ogg': 'ogg',
 'audio/mpeg': 'mp3',
 'audio/x-flac': 'flac',
 'audio/x-wav': 'wav',
 'multipart/x-mixed-replace': 'multipart',
 'video/mpegts': 'ts',
 'video/x-dv': 'dv',
 'video/x-flv': 'flv',
...