Cookies are NOT loaded from the named file until either the .load() or .revert() method is called.
(self, filename=None, delayload=False, policy=None)
| 1778 | """CookieJar that can be loaded from and saved to a file.""" |
| 1779 | |
| 1780 | def __init__(self, filename=None, delayload=False, policy=None): |
| 1781 | """ |
| 1782 | Cookies are NOT loaded from the named file until either the .load() or |
| 1783 | .revert() method is called. |
| 1784 | |
| 1785 | """ |
| 1786 | CookieJar.__init__(self, policy) |
| 1787 | if filename is not None: |
| 1788 | filename = os.fspath(filename) |
| 1789 | self.filename = filename |
| 1790 | self.delayload = bool(delayload) |
| 1791 | |
| 1792 | def save(self, filename=None, ignore_discard=False, ignore_expires=False): |
| 1793 | """Save cookies to a file.""" |