Package elisa :: Package core :: Module media_uri

Module media_uri

source code

URI parsing support

Classes
  ParseException
  MediaUri
Media URI management
Functions
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
Variables
  __maintainer__ = 'Philippe Normand <philippe@fluendo.com>'
  URI_RE = None
hash(x)

Imports: os, re, urllib, platform, copy, locale_helper, OrderedDict, Translatable


Function Details

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