argparse.FileType¶
-
class
argparse.FileType(mode='r', bufsize=-1)[source]¶ Factory for creating file object types
Instances of FileType are typically passed as type= arguments to the ArgumentParser add_argument() method.
- Keyword Arguments:
- mode – A string indicating how the file is to be opened. Accepts the
same values as the builtin open() function.
- bufsize – The file’s desired buffer size. Accepts the same values as
the builtin open() function.
Methods¶
__call__(string) |
|
__format__ |
default object formatter |
__init__([mode, bufsize]) |
|
__new__((S, ...) |
|
__reduce__ |
helper for pickle |
__reduce_ex__ |
helper for pickle |
__repr__() |
|
__sizeof__(() -> int) |
size of object in memory, in bytes |
__subclasshook__ |
Abstract classes can override this to customize issubclass(). |