/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Lib/ |
D | linecache.py | 13 def getline(filename, lineno, module_globals=None): argument 14 lines = getlines(filename, module_globals) 33 def getlines(filename, module_globals=None): argument 37 if filename in cache: 38 return cache[filename][2] 41 return updatecache(filename, module_globals) 47 def checkcache(filename=None): argument 51 if filename is None: 54 if filename in cache: 55 filenames = [filename] [all …]
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/ |
D | linecache.py | 13 def getline(filename, lineno, module_globals=None): argument 14 lines = getlines(filename, module_globals) 33 def getlines(filename, module_globals=None): argument 37 if filename in cache: 38 return cache[filename][2] 40 return updatecache(filename, module_globals) 43 def checkcache(filename=None): argument 47 if filename is None: 50 if filename in cache: 51 filenames = [filename] [all …]
|
D | bdb.py | 28 def canonic(self, filename): argument 29 if filename == "<" + filename[1:-1] + ">": 30 return filename 31 canonic = self.fncache.get(filename) 33 canonic = os.path.abspath(filename) 35 self.fncache[filename] = canonic 122 filename = self.canonic(frame.f_code.co_filename) 123 if not filename in self.breaks: 126 if not lineno in self.breaks[filename]: 130 if not lineno in self.breaks[filename]: [all …]
|
D | whichdb.py | 17 def whichdb(filename): argument 32 f = open(filename + os.extsep + "pag", "rb") 36 f = open(filename + os.extsep + "dir", "rb") 43 f = open(filename + os.extsep + "db", "rb") 49 d = dbm.open(filename) 58 os.stat(filename + os.extsep + "dat") 59 size = os.stat(filename + os.extsep + "dir").st_size 63 f = open(filename + os.extsep + "dir", "rb") 74 f = open(filename, "rb") 116 for filename in sys.argv[1:]: [all …]
|
D | codeop.py | 68 def _maybe_compile(compiler, source, filename, symbol): argument 82 code = compiler(source, filename, symbol) 87 code1 = compiler(source + "\n", filename, symbol) 92 code2 = compiler(source + "\n\n", filename, symbol) 101 def _compile(source, filename, symbol): argument 102 return compile(source, filename, symbol, PyCF_DONT_IMPLY_DEDENT) 104 def compile_command(source, filename="<input>", symbol="single"): argument 122 return _maybe_compile(_compile, source, filename, symbol) 132 def __call__(self, source, filename, symbol): argument 133 codeob = compile(source, filename, symbol, self.flags, 1) [all …]
|
D | trace.py | 141 def names(self, filename, modulename): argument 164 if filename is None: 178 if filename.startswith(d + os.sep): 190 filename, ext = os.path.splitext(base) 191 return filename 218 filename, ext = os.path.splitext(base) 219 return filename.lstrip(".") 275 for filename, modulename, funcname in calls: 277 % (filename, modulename, funcname)) 299 for filename, lineno in self.counts.keys(): [all …]
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/ |
D | update.py | 17 def __init__(self, filename): argument 18 self.filename = filename 21 self.lines = open(filename, 'r').readlines() 23 print '*** Can\'t open "%s":' % filename, msg 26 print 'diffing', self.filename 30 print 'no changes to', self.filename 33 os.rename(self.filename, self.filename + '~') 34 fp = open(self.filename, 'w') 36 print '*** Can\'t rewrite "%s":' % self.filename, msg 38 print 'writing', self.filename [all …]
|
/device/linaro/bootloader/edk2/BaseTools/Tests/ |
D | CheckPythonSyntax.py | 29 def SingleFileTest(self, filename): argument 31 py_compile.compile(filename, doraise=True) 33 self.fail('syntax error: %s, Error is %s' % (filename, str(e))) 39 for filename in files: 40 if filename.lower().endswith('.py'): 42 os.path.join(root, filename) 46 def MakeTestName(filename): argument 47 assert filename.lower().endswith('.py') 48 name = filename[:-3] 53 def MakeNewTest(filename): argument [all …]
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/hotshot/ |
D | log.py | 77 def get_fileno(self, filename): argument 78 filename = os.path.normcase(os.path.normpath(filename)) 80 if name == filename: 103 filename, funcname = self._decode_location(fileno, lineno) 104 t = (filename, lineno, funcname) 115 filename, firstlineno, funcname = self._stack[-1] 116 return what, (filename, lineno, funcname), tdelta 119 filename = os.path.normcase(os.path.normpath(tdelta)) 120 self._filemap[fileno] = filename 122 filename = self._filemap[fileno] [all …]
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/test/ |
D | test_gzip.py | 26 filename = test_support.TESTFN variable in TestGzip 29 test_support.unlink(self.filename) 32 test_support.unlink(self.filename) 36 with gzip.GzipFile(self.filename, 'wb') as f: 52 with gzip.GzipFile(self.filename, 'r') as f: 62 f = gzip.GzipFile(self.filename, 'r') 71 f = gzip.GzipFile(self.filename, 'w') 81 with gzip.GzipFile(self.filename, 'ab') as f: 84 with gzip.GzipFile(self.filename, 'rb') as f: 92 with gzip.open(self.filename, 'wb', 9) as f: [all …]
|
D | test_unicode_file.py | 34 def remove_if_exists(filename): argument 35 if os.path.exists(filename): 36 os.unlink(filename) 44 def _do_single(self, filename): argument 45 self.assertTrue(os.path.exists(filename)) 46 self.assertTrue(os.path.isfile(filename)) 47 self.assertTrue(os.access(filename, os.R_OK)) 48 self.assertTrue(os.path.exists(os.path.abspath(filename))) 49 self.assertTrue(os.path.isfile(os.path.abspath(filename))) 50 self.assertTrue(os.access(os.path.abspath(filename), os.R_OK)) [all …]
|
D | test_gdbm.py | 7 filename = TESTFN variable 17 unlink(filename) 20 self.g = gdbm.open(filename, 'c') 36 unlink(filename) 37 self.assertRaises(gdbm.error, gdbm.open, filename, 'r') 39 self.g = gdbm.open(filename, 'c') 43 self.assertRaises(gdbm.error, lambda: gdbm.open(filename, 'rx').close()) 51 self.g = gdbm.open(filename, mode) 58 self.g = gdbm.open(filename, mode + flag) 62 self.g = gdbm.open(filename, 'c') [all …]
|
D | test_bz2.py | 50 self.filename = TESTFN 53 if os.path.isfile(self.filename): 54 os.unlink(self.filename) 57 with open(self.filename, "wb") as f: 67 with BZ2File(self.filename) as bz2f: 74 with BZ2File(self.filename) as bz2f: 81 with BZ2File(self.filename) as bz2f: 93 with BZ2File(self.filename) as bz2f: 99 with BZ2File(self.filename) as bz2f: 108 with BZ2File(self.filename) as bz2f: [all …]
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/ |
D | fixheader.py | 9 for filename in args: 10 process(filename) 12 def process(filename): argument 14 f = open(filename, 'r') 16 sys.stderr.write('%s: can\'t open: %s\n' % (filename, str(msg))) 21 sys.stderr.write('%s does not begin with C comment\n' % filename) 24 f = open(filename, 'w') 26 sys.stderr.write('%s: can\'t write: %s\n' % (filename, str(msg))) 28 sys.stderr.write('Processing %s ...\n' % filename) 30 for c in filename:
|
D | ftpmirror.py | 134 filename = line.strip() 136 if filename[-1:] == '/': 137 filename = filename[:-1] 146 filename = words[-1].lstrip() 147 i = filename.find(" -> ") 151 print 'Found symbolic link %r' % (filename,) 152 linkto = filename[i+4:] 153 filename = filename[:i] 158 if fnmatch(filename, pat): 161 print 'matches', repr(filename) [all …]
|
D | untabify.py | 23 for filename in args: 24 process(filename, tabsize) 26 def process(filename, tabsize, verbose=True): argument 28 f = open(filename) 32 print "%r: I/O error: %s" % (filename, msg) 37 backup = filename + "~" 43 os.rename(filename, backup) 46 with open(filename, "w") as f: 49 print filename
|
D | crlf.py | 7 for filename in sys.argv[1:]: 8 if os.path.isdir(filename): 9 print filename, "Directory!" 11 data = open(filename, "rb").read() 13 print filename, "Binary!" 17 print filename 18 f = open(filename, "wb")
|
D | lfcr.py | 8 for filename in sys.argv[1:]: 9 if os.path.isdir(filename): 10 print filename, "Directory!" 12 data = open(filename, "rb").read() 14 print filename, "Binary!" 18 print filename 19 f = open(filename, "wb")
|
D | ptags.py | 19 for filename in args: 20 treat_file(filename) 30 def treat_file(filename): argument 32 fp = open(filename, 'r') 34 sys.stderr.write('Cannot open %s\n' % filename) 36 base = os.path.basename(filename) 39 s = base + '\t' + filename + '\t' + '1\n' 49 s = name + '\t' + filename + '\t/^' + content + '/\n'
|
D | suff.py | 12 for filename in files: 13 suff = getsuffix(filename) 16 suffixes[suff].append(filename) 22 def getsuffix(filename): argument 24 for i in range(len(filename)): 25 if filename[i] == '.': 26 suff = filename[i:]
|
D | objgraph.py | 91 for filename in flist: 92 print filename + ':' 93 elist = file2undef[filename] 110 for filename in files: 112 for label in file2def[filename]: 117 print filename + ':' 124 print filename + ': unused' 130 for filename in file2undef.keys(): 131 for ext in file2undef[filename]: 133 store(undefs, ext, filename) [all …]
|
D | h2py.py | 70 for filename in args: 71 if filename == '-': 75 fp = open(filename, 'r') 76 outfile = os.path.basename(filename) 82 outfp.write('# Generated by h2py from %s\n' % filename) 85 if filename[:len(dir)] == dir: 86 filedict[filename[len(dir)+1:]] = None # no '/' trailing 87 importable[filename[len(dir)+1:]] = modname 154 filename = line[a:b] 155 if importable.has_key(filename): [all …]
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Parser/ |
D | parsetok.c | 18 static void initerr(perrdetail *err_ret, const char* filename); 36 PyParser_ParseStringFlagsFilename(const char *s, const char *filename, in PyParser_ParseStringFlagsFilename() argument 41 return PyParser_ParseStringFlagsFilenameEx(s, filename, g, start, in PyParser_ParseStringFlagsFilename() 46 PyParser_ParseStringFlagsFilenameEx(const char *s, const char *filename, in PyParser_ParseStringFlagsFilenameEx() argument 52 initerr(err_ret, filename); in PyParser_ParseStringFlagsFilenameEx() 59 tok->filename = filename ? filename : "<string>"; in PyParser_ParseStringFlagsFilenameEx() 61 tok->altwarning = (tok->filename != NULL); in PyParser_ParseStringFlagsFilenameEx() 72 PyParser_ParseFile(FILE *fp, const char *filename, grammar *g, int start, in PyParser_ParseFile() argument 75 return PyParser_ParseFileFlags(fp, filename, g, start, ps1, ps2, in PyParser_ParseFile() 80 PyParser_ParseFileFlags(FILE *fp, const char *filename, grammar *g, int start, in PyParser_ParseFileFlags() argument [all …]
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Parser/ |
D | parsetok.c | 27 static void initerr(perrdetail *err_ret, const char* filename); 45 PyParser_ParseStringFlagsFilename(const char *s, const char *filename, in PyParser_ParseStringFlagsFilename() argument 50 return PyParser_ParseStringFlagsFilenameEx(s, filename, g, start, in PyParser_ParseStringFlagsFilename() 55 PyParser_ParseStringFlagsFilenameEx(const char *s, const char *filename, in PyParser_ParseStringFlagsFilenameEx() argument 61 initerr(err_ret, filename); in PyParser_ParseStringFlagsFilenameEx() 68 tok->filename = filename ? filename : "<string>"; in PyParser_ParseStringFlagsFilenameEx() 70 tok->altwarning = (tok->filename != NULL); in PyParser_ParseStringFlagsFilenameEx() 81 PyParser_ParseFile(FILE *fp, const char *filename, grammar *g, int start, in PyParser_ParseFile() argument 84 return PyParser_ParseFileFlags(fp, filename, g, start, ps1, ps2, in PyParser_ParseFile() 89 PyParser_ParseFileFlags(FILE *fp, const char *filename, grammar *g, int start, in PyParser_ParseFileFlags() argument [all …]
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Tools/compiler/ |
D | dumppyc.py | 30 def load(filename, codename=None): argument 31 co = loadCode(filename) 37 filename, codename = sys.argv[1:] variable 39 filename = sys.argv[1] variable 41 if filename.endswith('.py'): 42 buf = open(filename).read() 43 co = compile(buf, filename, "exec") 46 load(filename, codename)
|