![]() |
ATLAS Offline Software
|
Functions | |
| _formatFloat (x) | |
| _formatFloats (l) | |
| fprint (f, *args) | |
| fprintln (f, *args) | |
| fwrite (f, *args) | |
Variables | |
| c = coverage.Coverage ('PyUtils.fprint') | |
|
protected |
Format a value using py2 float formatting.
>>> print (_formatFloat ('asd'))
asd
>>> print (_formatFloat (1.234567801234567))
1.23456780123
>>> print (_formatFloat (2.0))
2.0
>>> print (_formatFloat (2e30))
2e+30
>>> print (_formatFloat (float('nan')))
nan
>>> print (_formatFloat (float('inf')))
inf
Definition at line 40 of file fprint.py.
|
protected |
Convert an argument list to use py2 formatting. >>> print (_formatFloats ((1, 'asd', 3.0))) (1, 'asd', '3.0')
Definition at line 68 of file fprint.py.
| python.fprint.fprint | ( | f, | |
| * | args ) |
Print a string with no terminating newline. Compatible with the python 2 print statement. >>> import sys >>> fprint (sys.stdout, 'a'); fprint (sys.stdout, 'b') a b >>> fwrite (sys.stdout, '\\n') <BLANKLINE> >>> fprint (sys.stdout, 'a'); fprint (sys.stdout, 2.0, '\\n'); fprint (sys.stdout, 'b') a 2.0 b
Definition at line 76 of file fprint.py.
| python.fprint.fprintln | ( | f, | |
| * | args ) |
Print a string with a terminating newline. Compatible with the python 2 print statement. >>> import sys >>> sys.stdout.softspace = 0 >>> fprint (sys.stdout, 'a'); fprintln (sys.stdout, 'b'); fprintln (sys.stdout, 'c'); fprint (sys.stdout, 'd') a b c d
Definition at line 100 of file fprint.py.
| python.fprint.fwrite | ( | f, | |
| * | args ) |
Write a string to a file. Compatible with the python 2 print statement space handling. >>> import sys >>> sys.stdout.softspace = 0 >>> fprint (sys.stdout, 'a'); fwrite (sys.stdout, '\\n'); fprint (sys.stdout, 'c') a c
Definition at line 119 of file fprint.py.
| python.fprint.c = coverage.Coverage ('PyUtils.fprint') |