Package proton :: Module _common
[frames] | no frames]

Module _common

source code

Classes
long
int(x=0) -> int or long int(x, base=10) -> int or long
unicode
str(object='') -> string
Constant
Functions
 
isinteger(value) source code
 
isstring(value) source code
 
secs2millis(secs) source code
 
millis2secs(millis) source code
 
unicode2utf8(string)
Some Proton APIs expect a null terminated string.
source code
 
utf82unicode(string)
Convert C strings returned from proton-c into python unicode
source code
Variables
  __package__ = None
Function Details

unicode2utf8(string)

source code 

Some Proton APIs expect a null terminated string. Convert python text types to UTF8 to avoid zero bytes introduced by other multi-byte encodings. This method will throw if the string cannot be converted.