Package elisa :: Package core :: Module media_uri
[hide private]
[frames] | no frames]

Module media_uri

source code

URI parsing support

Classes [hide private]
  ParseException
  MediaUri
Media URI management
Functions [hide private]
string, list or dict
quote(data, not_quote='')
Make strings, lists and dictionaries containing strings quoted using urllib.quote.
source code
string, list or dict of unicodes
unquote(data)
Unquote strings, lists and dictionaries containing strings quoted values using urllib.unquote.
source code
unicode
_unicode(data)
Convert data to unicode using utf-8 encoding instead of ascii.
source code
Variables [hide private]
  __maintainer__ = 'Philippe Normand <philippe@fluendo.com>'
  URI_RE = 'frontend'
Function Details [hide private]

quote(data, not_quote='')

source code 

Make strings, lists and dictionaries containing strings quoted using urllib.quote. Return value has the same type as the parameter given to this function. If the data is not a string, list or a dictionary, it is simply returned.

Warning: If you want to quote a path containing '/' as seperators, you have to add the slash to not_quote, or it will be quoted also!!!
Parameters:
  • data (string, list or dict) - unquoted data which can contain unsafe characters like &=
  • not_quote (string) - characters, which shouldn't be quoted.
Returns: string, list or dict

unquote(data)

source code 
Unquote strings, lists and dictionaries containing strings quoted values using urllib.unquote. Return value has the same type as the parameter given to this function. If the data is not a string, list or a dictionary, it is simply returned.
Parameters:
  • data (string, list or dict) - quoted data
Returns: string, list or dict of unicodes

_unicode(data)

source code 
Convert data to unicode using utf-8 encoding instead of ascii.
Parameters:
  • data (string, unicode or other object) - data to convert
Returns: unicode