]>
git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Python/Python-2.7.2/Tools/framer/framer/util.py
1 def cstring(s
, width
=70):
2 """Return C string representation of a Python string.
4 width specifies the maximum width of any line of the C string.
7 for l
in s
.split("\n"):
9 L
.append(r
'"%s\n"' % l
)
13 def unindent(s
, skipfirst
=True):
14 """Return an unindented version of a docstring.
16 Removes indentation on lines following the first one, using the
17 leading whitespace of the first indented line that is not blank
18 to determine the indentation.
31 indent
= len(l
) - len(ls
)
33 L
+= [l
[indent
:] for l
in lines
]