Lines Matching refs:filename
102 filename = module.__file__
105 if filename is not None:
106 filenames.append(filename)
107 for filename in filenames:
109 stat = os.stat(filename)
116 if filename.endswith('.pyc') and os.path.exists(filename[:-1]):
117 mtime = max(os.stat(filename[:-1]).st_mtime, mtime)
118 elif filename.endswith('$py.class') and \
119 os.path.exists(filename[:-9] + '.py'):
120 mtime = max(os.stat(filename[:-9] + '.py').st_mtime, mtime)
121 if filename not in self.module_mtimes:
122 self.module_mtimes[filename] = mtime
123 elif self.module_mtimes[filename] < mtime:
124 print("%s changed; reloading..." % filename, file=sys.stderr)
128 def watch_file(self, cls, filename): argument
130 filename = os.path.abspath(filename)
133 instance.watch_file(filename)
134 cls.global_extra_files.append(filename)
136 self.extra_files.append(filename)