Developpez.com

Python

Choisissez la catégorie, puis la rubrique :

9.4.1 netrc Objects


9.4.1 netrc Objects

A netrc instance has the following methods:

authenticators( host)
Return a 3-tuple (login, account, password) of authenticators for host. If the netrc file did not contain an entry for the given host, return the tuple associated with the `default' entry. If neither matching host nor default entry is available, return None.

__repr__( )
Dump the class data as a string in the format of a netrc file. (This discards comments and may reorder the entries.)

Instances of netrc have public instance variables:

hosts
Dictionary mapping host names to (login, account, password) tuples. The `default' entry, if any, is represented as a pseudo-host by that name.

macros
Dictionary mapping macro names to string lists.

Note: Passwords are limited to a subset of the ASCII character set. Versions of this module prior to 2.3 were extremely limited. Starting with 2.3, all ASCII punctuation is allowed in passwords. However, note that whitespace and non-printable characters are not allowed in passwords. This is a limitation of the way the .netrc file is parsed and may be removed in the future.

See About this document... for information on suggesting changes.
Python est sacré langage de programmation de l'année 2018 selon l'index TIOBE
Java, JavaScript et C++ ont été les langages les plus demandés en entreprise ces 9 derniers mois
Microsoft dévoile en open source Pyright, un vérificateur de type statique
Apprendre 23 principes pour écrire du code lisible, un tutoriel d'Artur Smiarowski
Contacter le responsable de la rubrique Python

Partenaire : Hébergement Web