Process the standard oargs from the command line.
(self, format=None, noclobber=None, delimiter=None, timeformat=None, hex=None, **unused_kwargs)
| 87 | self.fh = open(filename, self.mode) |
| 88 | |
| 89 | def set_oargs(self, format=None, noclobber=None, delimiter=None, timeformat=None, hex=None, **unused_kwargs): |
| 90 | """ |
| 91 | Process the standard oargs from the command line. |
| 92 | """ |
| 93 | if delimiter: |
| 94 | if delimiter == "tab": |
| 95 | self.delimiter = '\t' |
| 96 | else: |
| 97 | self.delimiter = delimiter |
| 98 | if timeformat: |
| 99 | self.timeformat = timeformat |
| 100 | if noclobber: |
| 101 | self.noclobber = noclobber |
| 102 | if hex: |
| 103 | self.hexmode = hex |
| 104 | if format: |
| 105 | self.set_format(format) |
| 106 | |
| 107 | def set_format(self, fmt): |
| 108 | """Set the output format to a new format string""" |