Home
last modified time | relevance | path

Searched refs:lines (Results 1 – 25 of 150) sorted by relevance

123456

/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/
DMimeWriter.py105 lines = value.split("\n")
106 while lines and not lines[-1]: del lines[-1]
107 while lines and not lines[0]: del lines[0]
108 for i in range(1, len(lines)):
109 lines[i] = " " + lines[i].strip()
110 value = "\n".join(lines) + "\n"
Dinspect.py377 lines = string.split(string.expandtabs(doc), '\n')
383 for line in lines[1:]:
389 if lines:
390 lines[0] = lines[0].lstrip()
392 for i in range(1, len(lines)): lines[i] = lines[i][margin:]
394 while lines and not lines[-1]:
395 lines.pop()
396 while lines and not lines[0]:
397 lines.pop(0)
398 return string.join(lines, '\n')
[all …]
Dlinecache.py14 lines = getlines(filename, module_globals)
15 if 1 <= lineno <= len(lines):
16 return lines[lineno-1]
56 size, mtime, lines, fullname = cache[filename]
128 lines = fp.readlines()
131 if lines and not lines[-1].endswith('\n'):
132 lines[-1] += '\n'
134 cache[filename] = size, mtime, lines, fullname
135 return lines
Dnntplib.py312 resp, lines = self.descriptions(group)
313 if len(lines) == 0:
316 return lines[0][1]
328 lines = []
332 lines.append(match.group(1, 2))
333 return resp, lines
461 resp, lines = self.longcmd('XHDR ' + hdr + ' ' + str, file)
462 for i in range(len(lines)):
463 line = lines[i]
466 lines[i] = m.group(1, 2)
[all …]
Dkeyword.py64 lines = []
69 lines.append(" '" + match.group(1) + "',\n")
71 lines.sort()
82 format[start:end] = lines
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/
Drgrep.py40 lines = buffer.split("\n")
43 if not lines[-1]:
44 del lines[-1]
46 lines[-1] = lines[-1] + leftover
48 leftover = lines[0]
49 del lines[0]
52 lines.reverse()
53 for line in lines:
Dlogmerge.py79 lines = []
85 if lines:
86 chunk.append(lines)
89 if lines:
90 chunk.append(lines)
91 lines = []
93 lines.append(line)
98 lines = chunk[0]
101 for line in lines:
115 for line in lines:
[all …]
Dreindent.py165 self.lines = [_rstrip(line).expandtabs() + "\n"
167 self.lines.insert(0, None)
179 lines = self.lines
180 while lines and lines[-1] == "\n":
181 lines.pop()
184 stats.append((len(lines), 0))
192 after.extend(lines[1:i])
196 have = getlspace(lines[thisstmt])
210 if have == getlspace(lines[jline]):
221 getlspace(lines[jline])
[all …]
Dnm2def.py45 lines = os.popen(NM % lib).readlines()
46 lines = [s.strip() for s in lines]
48 for line in lines:
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Lib/
Dinspect.py375 lines = string.split(string.expandtabs(doc), '\n')
381 for line in lines[1:]:
387 if lines:
388 lines[0] = lines[0].lstrip()
390 for i in range(1, len(lines)): lines[i] = lines[i][margin:]
392 while lines and not lines[-1]:
393 lines.pop()
394 while lines and not lines[0]:
395 lines.pop(0)
396 return string.join(lines, '\n')
[all …]
Dlinecache.py14 lines = getlines(filename, module_globals)
15 if 1 <= lineno <= len(lines):
16 return lines[lineno-1]
60 size, mtime, lines, fullname = cache[filename]
132 lines = fp.readlines()
135 if lines and not lines[-1].endswith('\n'):
136 lines[-1] += '\n'
138 cache[filename] = size, mtime, lines, fullname
139 return lines
Dkeyword.py64 lines = []
69 lines.append(" '" + match.group(1) + "',\n")
71 lines.sort()
82 format[start:end] = lines
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/
DbgenOutput.py72 lines = text.split('\n')
73 for i in range(len(lines)):
74 if lines[i] and lines[i][0] != '#':
75 lines[i] = indent + lines[i]
76 text = '\n'.join(lines)
170 lines = text.split('\n')
172 for line in lines:
180 for line in lines:
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/
Dupdate.py21 self.lines = open(filename, 'r').readlines()
24 self.lines = None
39 for line in self.lines:
45 if self.lines is None:
50 if not 0 <= i < len(self.lines):
54 if self.lines[i] == rest:
61 print '<', self.lines[i],
63 self.lines[i] = rest
64 print '>', self.lines[i],
Dlpwatch.py43 lines = []
75 lines.append(line)
91 lines.append(line)
95 lines.append('lpq exit status %r' % (sts,))
96 return ': '.join(lines)
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/test/
Dtest_fileinput.py20 def writeTmp(i, lines, mode='w'): # opening in text mode is the default argument
23 f.writelines(lines)
51 lines = list(fi)
53 self.assertEqual(len(lines), 31)
54 self.assertEqual(lines[4], 'Line 5 of file 1\n')
55 self.assertEqual(lines[30], 'Line 1 of file 4\n')
84 lines = list(fi)
85 self.assertEqual(len(lines), 33)
86 self.assertEqual(lines[32], 'Line 2 of stdin\n')
150 lines = list(fi)
[all …]
Dtest_dis.py94 lines = got.split('\n')
95 lines = [line.rstrip() for line in lines]
98 if expected != lines:
102 lines)))
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/email/
Dfeedparser.py114 lines = []
116 lines.append(parts[i*2] + parts[i*2+1])
117 self.pushlines(lines)
119 def pushlines(self, lines): argument
121 self._lines[:0] = lines[::-1]
220 lines = []
228 lines.append(line)
229 self._cur.set_payload(EMPTYSTRING.join(lines))
288 lines = []
293 lines.append(line)
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Tools/framer/framer/
Dutil.py21 lines = s.split("\n")
23 first = lines.pop(0)
28 for l in lines:
33 L += [l[indent:] for l in lines]
Dstructparse.py22 lines = filter(None, s.split("\n")) # get non-empty lines
23 assert lines[0].strip() == "typedef struct {"
24 pyhead = lines[1].strip()
28 for line in lines[2:]:
Dstruct.py28 lines = filter(None, s.split("\n")) # get non-empty lines
29 assert lines[0].strip() == "typedef struct {"
30 pyhead = lines[1].strip()
34 for line in lines[2:]:
/device/linaro/bootloader/edk2/BaseTools/Source/Python/GenPatchPcdTable/
DGenPatchPcdTable.py48 lines = []
51 lines = f.readlines()
56 if len(lines) == 0: return None
57 firstline = lines[0].strip()
60 return _parseForGCC(lines, efifilepath)
61 return _parseGeneral(lines, efifilepath)
63 def _parseForGCC(lines, efifilepath): argument
69 for line in lines:
110 def _parseGeneral(lines, efifilepath): argument
121 for line in lines:
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/
Dbdist_wininst.py204 lines = []
208 lines.append("[metadata]")
224 lines.append("%s=%s" % (name, escape(data)))
228 lines.append("\n[Setup]")
230 lines.append("install_script=%s" % self.install_script)
231 lines.append("info=%s" % escape(info))
232 lines.append("target_compile=%d" % (not self.no_target_compile))
233 lines.append("target_optimize=%d" % (not self.no_target_optimize))
235 lines.append("target_version=%s" % self.target_version)
237 lines.append("user_access_control=%s" % self.user_access_control)
[all …]
/device/linaro/bootloader/edk2/BaseTools/Scripts/
DPatchCheck.py184 lines = self.msg.splitlines()
186 if len(lines) >= 1 and lines[0].endswith('\r\n'):
191 lines.insert(0, empty_line)
192 lines.insert(0, self.subject + empty_line)
194 count = len(lines)
200 if count >= 1 and len(lines[0]) > 76:
204 if count >= 1 and len(lines[0].strip()) == 0:
208 if count >= 2 and lines[1].strip() != '':
213 if (len(lines[i]) > 76 and
214 len(lines[i].split()) > 1 and
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/
Dfancy_getopt.py357 lines = [header]
359 lines = ['Option summary:']
370 lines.append(" --%-*s %s" % (max_opt, long, text[0]))
372 lines.append(" --%-*s " % (max_opt, long))
379 lines.append(" --%-*s %s" %
382 lines.append(" --%-*s" % opt_names)
385 lines.append(big_indent + l)
389 return lines
426 lines = []
462 lines.append(string.join(cur_line, ''))
[all …]

123456