Lines Matching refs:fullpath
33 def _open(fullpath): argument
35 size = os.stat(fullpath).st_size
37 print_debug("%s: permission denied: %s" % (fullpath, err))
41 print_debug("%s: the file is too big: %d bytes" % (fullpath, size))
45 return open(fullpath, 'rU')
47 print_debug("%s: access denied: %s" % (fullpath, err))
50 def has_python_ext(fullpath): argument
51 return fullpath.endswith(".py") or fullpath.endswith(".pyw")
53 def looks_like_python(fullpath): argument
54 infile = _open(fullpath)
63 print_debug("%s: appears to be binary" % fullpath)
66 if fullpath.endswith(".py") or fullpath.endswith(".pyw"):
74 def can_be_compiled(fullpath): argument
75 infile = _open(fullpath)
83 compile(code, fullpath, "exec")
85 print_debug("%s: cannot compile: %s" % (fullpath, err))
116 fullpath = os.path.join(dirpath, filename)
117 print_debug("testing: %s" % fullpath)
118 if is_python(fullpath):
119 yield fullpath
126 for fullpath in walk_python_files(['.']):
127 print fullpath
129 for fullpath in walk_python_files(['.'], is_python=can_be_compiled):
130 print fullpath