1 2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 3<html><head><title>Python: module telemetry.core.os_version</title> 4<meta charset="utf-8"> 5</head><body bgcolor="#f0f0f8"> 6 7<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> 8<tr bgcolor="#7799ee"> 9<td valign=bottom> <br> 10<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.core.html"><font color="#ffffff">core</font></a>.os_version</strong></big></big></font></td 11><td align=right valign=bottom 12><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/os_version.py">telemetry/core/os_version.py</a></font></td></tr></table> 13 <p><tt># Copyright 2014 The Chromium Authors. All rights reserved.<br> 14# Use of this source code is governed by a BSD-style license that can be<br> 15# found in the LICENSE file.</tt></p> 16<p> 17<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 18<tr bgcolor="#ee77aa"> 19<td colspan=3 valign=bottom> <br> 20<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> 21 22<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> 23<td width="100%"><dl> 24<dt><font face="helvetica, arial"><a href="__builtin__.html#str">__builtin__.str</a>(<a href="__builtin__.html#basestring">__builtin__.basestring</a>) 25</font></dt><dd> 26<dl> 27<dt><font face="helvetica, arial"><a href="telemetry.core.os_version.html#OSVersion">OSVersion</a> 28</font></dt></dl> 29</dd> 30</dl> 31 <p> 32<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 33<tr bgcolor="#ffc8d8"> 34<td colspan=3 valign=bottom> <br> 35<font color="#000000" face="helvetica, arial"><a name="OSVersion">class <strong>OSVersion</strong></a>(<a href="__builtin__.html#str">__builtin__.str</a>)</font></td></tr> 36 37<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> 38<td colspan=2><tt># pylint: disable=W0212<br> </tt></td></tr> 39<tr><td> </td> 40<td width="100%"><dl><dt>Method resolution order:</dt> 41<dd><a href="telemetry.core.os_version.html#OSVersion">OSVersion</a></dd> 42<dd><a href="__builtin__.html#str">__builtin__.str</a></dd> 43<dd><a href="__builtin__.html#basestring">__builtin__.basestring</a></dd> 44<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 45</dl> 46<hr> 47Methods defined here:<br> 48<dl><dt><a name="OSVersion-__ge__"><strong>__ge__</strong></a>(self, other)</dt></dl> 49 50<dl><dt><a name="OSVersion-__gt__"><strong>__gt__</strong></a>(self, other)</dt></dl> 51 52<dl><dt><a name="OSVersion-__le__"><strong>__le__</strong></a>(self, other)</dt></dl> 53 54<dl><dt><a name="OSVersion-__lt__"><strong>__lt__</strong></a>(self, other)</dt></dl> 55 56<hr> 57Static methods defined here:<br> 58<dl><dt><a name="OSVersion-__new__"><strong>__new__</strong></a>(cls, friendly_name, sortable_name, *args, **kwargs)</dt></dl> 59 60<hr> 61Data descriptors defined here:<br> 62<dl><dt><strong>__dict__</strong></dt> 63<dd><tt>dictionary for instance variables (if defined)</tt></dd> 64</dl> 65<hr> 66Methods inherited from <a href="__builtin__.html#str">__builtin__.str</a>:<br> 67<dl><dt><a name="OSVersion-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#OSVersion-__add__">__add__</a>(y) <==> x+y</tt></dd></dl> 68 69<dl><dt><a name="OSVersion-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#OSVersion-__contains__">__contains__</a>(y) <==> y in x</tt></dd></dl> 70 71<dl><dt><a name="OSVersion-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#OSVersion-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl> 72 73<dl><dt><a name="OSVersion-__format__"><strong>__format__</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-__format__">__format__</a>(format_spec) -> string<br> 74 <br> 75Return a formatted version of S as described by format_spec.</tt></dd></dl> 76 77<dl><dt><a name="OSVersion-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#OSVersion-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> 78 79<dl><dt><a name="OSVersion-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#OSVersion-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> 80 81<dl><dt><a name="OSVersion-__getnewargs__"><strong>__getnewargs__</strong></a>(...)</dt></dl> 82 83<dl><dt><a name="OSVersion-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#OSVersion-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> 84 <br> 85Use of negative indices is not supported.</tt></dd></dl> 86 87<dl><dt><a name="OSVersion-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#OSVersion-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl> 88 89<dl><dt><a name="OSVersion-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#OSVersion-__len__">__len__</a>() <==> len(x)</tt></dd></dl> 90 91<dl><dt><a name="OSVersion-__mod__"><strong>__mod__</strong></a>(...)</dt><dd><tt>x.<a href="#OSVersion-__mod__">__mod__</a>(y) <==> x%y</tt></dd></dl> 92 93<dl><dt><a name="OSVersion-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#OSVersion-__mul__">__mul__</a>(n) <==> x*n</tt></dd></dl> 94 95<dl><dt><a name="OSVersion-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#OSVersion-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl> 96 97<dl><dt><a name="OSVersion-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#OSVersion-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> 98 99<dl><dt><a name="OSVersion-__rmod__"><strong>__rmod__</strong></a>(...)</dt><dd><tt>x.<a href="#OSVersion-__rmod__">__rmod__</a>(y) <==> y%x</tt></dd></dl> 100 101<dl><dt><a name="OSVersion-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#OSVersion-__rmul__">__rmul__</a>(n) <==> n*x</tt></dd></dl> 102 103<dl><dt><a name="OSVersion-__sizeof__"><strong>__sizeof__</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-__sizeof__">__sizeof__</a>() -> size of S in memory, in bytes</tt></dd></dl> 104 105<dl><dt><a name="OSVersion-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#OSVersion-__str__">__str__</a>() <==> <a href="__builtin__.html#str">str</a>(x)</tt></dd></dl> 106 107<dl><dt><a name="OSVersion-capitalize"><strong>capitalize</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-capitalize">capitalize</a>() -> string<br> 108 <br> 109Return a copy of the string S with only its first character<br> 110capitalized.</tt></dd></dl> 111 112<dl><dt><a name="OSVersion-center"><strong>center</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-center">center</a>(width[, fillchar]) -> string<br> 113 <br> 114Return S centered in a string of length width. Padding is<br> 115done using the specified fill character (default is a space)</tt></dd></dl> 116 117<dl><dt><a name="OSVersion-count"><strong>count</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-count">count</a>(sub[, start[, end]]) -> int<br> 118 <br> 119Return the number of non-overlapping occurrences of substring sub in<br> 120string S[start:end]. Optional arguments start and end are interpreted<br> 121as in slice notation.</tt></dd></dl> 122 123<dl><dt><a name="OSVersion-decode"><strong>decode</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-decode">decode</a>([encoding[,errors]]) -> object<br> 124 <br> 125Decodes S using the codec registered for encoding. encoding defaults<br> 126to the default encoding. errors may be given to set a different error<br> 127handling scheme. Default is 'strict' meaning that encoding errors raise<br> 128a UnicodeDecodeError. Other possible values are 'ignore' and 'replace'<br> 129as well as any other name registered with codecs.register_error that is<br> 130able to handle UnicodeDecodeErrors.</tt></dd></dl> 131 132<dl><dt><a name="OSVersion-encode"><strong>encode</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-encode">encode</a>([encoding[,errors]]) -> object<br> 133 <br> 134Encodes S using the codec registered for encoding. encoding defaults<br> 135to the default encoding. errors may be given to set a different error<br> 136handling scheme. Default is 'strict' meaning that encoding errors raise<br> 137a UnicodeEncodeError. Other possible values are 'ignore', 'replace' and<br> 138'xmlcharrefreplace' as well as any other name registered with<br> 139codecs.register_error that is able to handle UnicodeEncodeErrors.</tt></dd></dl> 140 141<dl><dt><a name="OSVersion-endswith"><strong>endswith</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-endswith">endswith</a>(suffix[, start[, end]]) -> bool<br> 142 <br> 143Return True if S ends with the specified suffix, False otherwise.<br> 144With optional start, test S beginning at that position.<br> 145With optional end, stop comparing S at that position.<br> 146suffix can also be a tuple of strings to try.</tt></dd></dl> 147 148<dl><dt><a name="OSVersion-expandtabs"><strong>expandtabs</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-expandtabs">expandtabs</a>([tabsize]) -> string<br> 149 <br> 150Return a copy of S where all tab characters are expanded using spaces.<br> 151If tabsize is not given, a tab size of 8 characters is assumed.</tt></dd></dl> 152 153<dl><dt><a name="OSVersion-find"><strong>find</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-find">find</a>(sub [,start [,end]]) -> int<br> 154 <br> 155Return the lowest index in S where substring sub is found,<br> 156such that sub is contained within S[start:end]. Optional<br> 157arguments start and end are interpreted as in slice notation.<br> 158 <br> 159Return -1 on failure.</tt></dd></dl> 160 161<dl><dt><a name="OSVersion-format"><strong>format</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-format">format</a>(*args, **kwargs) -> string<br> 162 <br> 163Return a formatted version of S, using substitutions from args and kwargs.<br> 164The substitutions are identified by braces ('{' and '}').</tt></dd></dl> 165 166<dl><dt><a name="OSVersion-index"><strong>index</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-index">index</a>(sub [,start [,end]]) -> int<br> 167 <br> 168Like S.<a href="#OSVersion-find">find</a>() but raise ValueError when the substring is not found.</tt></dd></dl> 169 170<dl><dt><a name="OSVersion-isalnum"><strong>isalnum</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-isalnum">isalnum</a>() -> bool<br> 171 <br> 172Return True if all characters in S are alphanumeric<br> 173and there is at least one character in S, False otherwise.</tt></dd></dl> 174 175<dl><dt><a name="OSVersion-isalpha"><strong>isalpha</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-isalpha">isalpha</a>() -> bool<br> 176 <br> 177Return True if all characters in S are alphabetic<br> 178and there is at least one character in S, False otherwise.</tt></dd></dl> 179 180<dl><dt><a name="OSVersion-isdigit"><strong>isdigit</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-isdigit">isdigit</a>() -> bool<br> 181 <br> 182Return True if all characters in S are digits<br> 183and there is at least one character in S, False otherwise.</tt></dd></dl> 184 185<dl><dt><a name="OSVersion-islower"><strong>islower</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-islower">islower</a>() -> bool<br> 186 <br> 187Return True if all cased characters in S are lowercase and there is<br> 188at least one cased character in S, False otherwise.</tt></dd></dl> 189 190<dl><dt><a name="OSVersion-isspace"><strong>isspace</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-isspace">isspace</a>() -> bool<br> 191 <br> 192Return True if all characters in S are whitespace<br> 193and there is at least one character in S, False otherwise.</tt></dd></dl> 194 195<dl><dt><a name="OSVersion-istitle"><strong>istitle</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-istitle">istitle</a>() -> bool<br> 196 <br> 197Return True if S is a titlecased string and there is at least one<br> 198character in S, i.e. uppercase characters may only follow uncased<br> 199characters and lowercase characters only cased ones. Return False<br> 200otherwise.</tt></dd></dl> 201 202<dl><dt><a name="OSVersion-isupper"><strong>isupper</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-isupper">isupper</a>() -> bool<br> 203 <br> 204Return True if all cased characters in S are uppercase and there is<br> 205at least one cased character in S, False otherwise.</tt></dd></dl> 206 207<dl><dt><a name="OSVersion-join"><strong>join</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-join">join</a>(iterable) -> string<br> 208 <br> 209Return a string which is the concatenation of the strings in the<br> 210iterable. The separator between elements is S.</tt></dd></dl> 211 212<dl><dt><a name="OSVersion-ljust"><strong>ljust</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-ljust">ljust</a>(width[, fillchar]) -> string<br> 213 <br> 214Return S left-justified in a string of length width. Padding is<br> 215done using the specified fill character (default is a space).</tt></dd></dl> 216 217<dl><dt><a name="OSVersion-lower"><strong>lower</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-lower">lower</a>() -> string<br> 218 <br> 219Return a copy of the string S converted to lowercase.</tt></dd></dl> 220 221<dl><dt><a name="OSVersion-lstrip"><strong>lstrip</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-lstrip">lstrip</a>([chars]) -> string or unicode<br> 222 <br> 223Return a copy of the string S with leading whitespace removed.<br> 224If chars is given and not None, remove characters in chars instead.<br> 225If chars is unicode, S will be converted to unicode before stripping</tt></dd></dl> 226 227<dl><dt><a name="OSVersion-partition"><strong>partition</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-partition">partition</a>(sep) -> (head, sep, tail)<br> 228 <br> 229Search for the separator sep in S, and return the part before it,<br> 230the separator itself, and the part after it. If the separator is not<br> 231found, return S and two empty strings.</tt></dd></dl> 232 233<dl><dt><a name="OSVersion-replace"><strong>replace</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-replace">replace</a>(old, new[, count]) -> string<br> 234 <br> 235Return a copy of string S with all occurrences of substring<br> 236old replaced by new. If the optional argument count is<br> 237given, only the first count occurrences are replaced.</tt></dd></dl> 238 239<dl><dt><a name="OSVersion-rfind"><strong>rfind</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-rfind">rfind</a>(sub [,start [,end]]) -> int<br> 240 <br> 241Return the highest index in S where substring sub is found,<br> 242such that sub is contained within S[start:end]. Optional<br> 243arguments start and end are interpreted as in slice notation.<br> 244 <br> 245Return -1 on failure.</tt></dd></dl> 246 247<dl><dt><a name="OSVersion-rindex"><strong>rindex</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-rindex">rindex</a>(sub [,start [,end]]) -> int<br> 248 <br> 249Like S.<a href="#OSVersion-rfind">rfind</a>() but raise ValueError when the substring is not found.</tt></dd></dl> 250 251<dl><dt><a name="OSVersion-rjust"><strong>rjust</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-rjust">rjust</a>(width[, fillchar]) -> string<br> 252 <br> 253Return S right-justified in a string of length width. Padding is<br> 254done using the specified fill character (default is a space)</tt></dd></dl> 255 256<dl><dt><a name="OSVersion-rpartition"><strong>rpartition</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-rpartition">rpartition</a>(sep) -> (head, sep, tail)<br> 257 <br> 258Search for the separator sep in S, starting at the end of S, and return<br> 259the part before it, the separator itself, and the part after it. If the<br> 260separator is not found, return two empty strings and S.</tt></dd></dl> 261 262<dl><dt><a name="OSVersion-rsplit"><strong>rsplit</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-rsplit">rsplit</a>([sep [,maxsplit]]) -> list of strings<br> 263 <br> 264Return a list of the words in the string S, using sep as the<br> 265delimiter string, starting at the end of the string and working<br> 266to the front. If maxsplit is given, at most maxsplit splits are<br> 267done. If sep is not specified or is None, any whitespace string<br> 268is a separator.</tt></dd></dl> 269 270<dl><dt><a name="OSVersion-rstrip"><strong>rstrip</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-rstrip">rstrip</a>([chars]) -> string or unicode<br> 271 <br> 272Return a copy of the string S with trailing whitespace removed.<br> 273If chars is given and not None, remove characters in chars instead.<br> 274If chars is unicode, S will be converted to unicode before stripping</tt></dd></dl> 275 276<dl><dt><a name="OSVersion-split"><strong>split</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-split">split</a>([sep [,maxsplit]]) -> list of strings<br> 277 <br> 278Return a list of the words in the string S, using sep as the<br> 279delimiter string. If maxsplit is given, at most maxsplit<br> 280splits are done. If sep is not specified or is None, any<br> 281whitespace string is a separator and empty strings are removed<br> 282from the result.</tt></dd></dl> 283 284<dl><dt><a name="OSVersion-splitlines"><strong>splitlines</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-splitlines">splitlines</a>(keepends=False) -> list of strings<br> 285 <br> 286Return a list of the lines in S, breaking at line boundaries.<br> 287Line breaks are not included in the resulting list unless keepends<br> 288is given and true.</tt></dd></dl> 289 290<dl><dt><a name="OSVersion-startswith"><strong>startswith</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-startswith">startswith</a>(prefix[, start[, end]]) -> bool<br> 291 <br> 292Return True if S starts with the specified prefix, False otherwise.<br> 293With optional start, test S beginning at that position.<br> 294With optional end, stop comparing S at that position.<br> 295prefix can also be a tuple of strings to try.</tt></dd></dl> 296 297<dl><dt><a name="OSVersion-strip"><strong>strip</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-strip">strip</a>([chars]) -> string or unicode<br> 298 <br> 299Return a copy of the string S with leading and trailing<br> 300whitespace removed.<br> 301If chars is given and not None, remove characters in chars instead.<br> 302If chars is unicode, S will be converted to unicode before stripping</tt></dd></dl> 303 304<dl><dt><a name="OSVersion-swapcase"><strong>swapcase</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-swapcase">swapcase</a>() -> string<br> 305 <br> 306Return a copy of the string S with uppercase characters<br> 307converted to lowercase and vice versa.</tt></dd></dl> 308 309<dl><dt><a name="OSVersion-title"><strong>title</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-title">title</a>() -> string<br> 310 <br> 311Return a titlecased version of S, i.e. words start with uppercase<br> 312characters, all remaining cased characters have lowercase.</tt></dd></dl> 313 314<dl><dt><a name="OSVersion-translate"><strong>translate</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-translate">translate</a>(table [,deletechars]) -> string<br> 315 <br> 316Return a copy of the string S, where all characters occurring<br> 317in the optional argument deletechars are removed, and the<br> 318remaining characters have been mapped through the given<br> 319translation table, which must be a string of length 256 or None.<br> 320If the table argument is None, no translation is applied and<br> 321the operation simply removes the characters in deletechars.</tt></dd></dl> 322 323<dl><dt><a name="OSVersion-upper"><strong>upper</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-upper">upper</a>() -> string<br> 324 <br> 325Return a copy of the string S converted to uppercase.</tt></dd></dl> 326 327<dl><dt><a name="OSVersion-zfill"><strong>zfill</strong></a>(...)</dt><dd><tt>S.<a href="#OSVersion-zfill">zfill</a>(width) -> string<br> 328 <br> 329Pad a numeric string S with zeros on the left, to fill a field<br> 330of the specified width. The string S is never truncated.</tt></dd></dl> 331 332</td></tr></table></td></tr></table><p> 333<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 334<tr bgcolor="#55aa55"> 335<td colspan=3 valign=bottom> <br> 336<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> 337 338<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> 339<td width="100%"><strong>ELCAPITAN</strong> = 'elcapitan'<br> 340<strong>LEOPARD</strong> = 'leopard'<br> 341<strong>LION</strong> = 'lion'<br> 342<strong>MAVERICKS</strong> = 'mavericks'<br> 343<strong>MOUNTAINLION</strong> = 'mountainlion'<br> 344<strong>SNOWLEOPARD</strong> = 'snowleopard'<br> 345<strong>VISTA</strong> = 'vista'<br> 346<strong>WIN7</strong> = 'win7'<br> 347<strong>WIN8</strong> = 'win8'<br> 348<strong>XP</strong> = 'xp'<br> 349<strong>YOSEMITE</strong> = 'yosemite'</td></tr></table> 350</body></html>