Lines Matching defs:file

73     """Write a log message, if there is a log file.

77 (initially), to dolog (once the log file has been opened), or to
83 will write "a: b" to the log file, followed by a newline.
85 If the global logfp is not None, it should be a file object to
89 giving a filename to open, in append mode. This file should be
90 world writable!!! If the file can't be opened, logging is
108 """Write a log message to the log file. See initlog() for docs."""
126 """Parse a query in the environment or from a file (default stdin)
130 fp : file pointer; default: sys.stdin
198 fp : input file
330 """Like FieldStorage, for use when no file uploads are possible."""
336 file = None
346 # self.file = StringIO(value)
367 client side filename, *not* the file name on which it is
368 stored (that's a temporary file you don't deal with)
370 value: the value as a *string*; for file uploads, this
371 transparently reads the file every time you request the value
373 file: the file(-like) object from which you can read the data;
390 a file open for reading and writing. This makes it possible to
402 fp : file pointer; default: sys.stdin
503 self.list = self.file = None
523 if self.file:
524 self.file.seek(0)
525 value = self.file.read()
526 self.file.seek(0)
648 self.file.seek(0)
650 bufsize = 8*1024 # I/O buffering size for copy to file
654 self.file = self.make_file('b')
662 self.file.write(data)
667 self.file = self.__file = StringIO()
676 self.file = self.make_file('')
677 self.file.write(self.__file.getvalue())
679 self.file.write(line)
744 """Overridable: return a readable & writable file.
746 The file will be used as follows:
751 The 'binary' argument is unused -- the file is always opened
754 This version opens a temporary file for reading and writing,
756 that the file can still be used, but it can't be opened by
760 If you want a more permanent file, you derive a class which
761 overrides this method. If you want a visible temporary file
1049 # Call test() when this file is run as a script (not imported as a module)