Lines Matching refs:file
11 """Exception raised on syntax errors in the .netrc file."""
67 def __init__(self, file=None):
68 default_netrc = file is None
69 if file is None:
70 file = os.path.join(os.path.expanduser("~"), ".netrc")
74 with open(file, encoding="utf-8") as fp:
75 self._parse(file, fp, default_netrc)
77 with open(file, encoding="locale") as fp:
78 self._parse(file, fp, default_netrc)
80 def _parse(self, file, fp, default_netrc):
104 file, lexer.lineno)
114 "bad toplevel token %r" % tt, file, lexer.lineno)
117 raise NetrcParseError("missing %r name" % tt, file, lexer.lineno)
141 file, lexer.lineno)
158 (f"~/.netrc file owner ({fowner}, {user}) does not match"
176 """Dump the class data in the format of a .netrc file."""