Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Calcul scientifique
avec Python
Voir le programme détaillé
Module « pathlib » Python 3.13.2

Classe « PurePath »

Informations générales

Héritage

builtins.object
    PurePathBase
        PurePath

Définition

class PurePath(PurePathBase):

help(PurePath)

Base class for manipulating paths without I/O.

PurePath represents a filesystem path and offers operations which
don't imply any actual filesystem I/O.  Depending on your system,
instantiating a PurePath will return either a PurePosixPath or a
PureWindowsPath object.  You can also instantiate either of these classes
directly, regardless of your system.

Constructeur(s)

Signature du constructeur Description
__new__(cls, *args, **kwargs) Construct a PurePath from one or several strings and or existing [extrait de __new__.__doc__]
__init__(self, *args)

Liste des attributs statiques

Nom de l'attribut Valeur
parser<module 'ntpath' (frozen)>

Liste des propriétés

Nom de la propriétéDescription
anchorThe concatenation of the drive and root, or ''. [extrait de anchor.__doc__]
driveThe drive prefix (letter or UNC path), if any. [extrait de drive.__doc__]
nameThe final path component, if any. [extrait de name.__doc__]
parentThe logical parent of the path. [extrait de parent.__doc__]
parentsA sequence of this path's logical parents. [extrait de parents.__doc__]
partsAn object providing sequence-like access to the [extrait de parts.__doc__]
rootThe root of the path, if any. [extrait de root.__doc__]
stemThe final path component, minus its last suffix. [extrait de stem.__doc__]
suffix
suffixes

Liste des opérateurs

Signature de l'opérateur Description
__eq__(self, other)
__ge__(self, other)
__gt__(self, other)
__le__(self, other)
__lt__(self, other)
__rtruediv__(self, key)
__truediv__(self, key)

Opérateurs hérités de la classe object

__ne__

Liste des méthodes

Toutes les méthodes Méthodes d'instance Méthodes statiques Méthodes dépréciées
Signature de la méthodeDescription
__bytes__(self) Return the bytes representation of the path. This is only [extrait de __bytes__.__doc__]
__fspath__(self)
__hash__(self)
__reduce__(self)
__repr__(self)
__str__(self) Return the string representation of the path, suitable for [extrait de __str__.__doc__]
as_uri(self) Return the path as a URI. [extrait de as_uri.__doc__]
is_absolute(self) True if the path is absolute (has both a root and, if applicable, [extrait de is_absolute.__doc__]
is_relative_to(self, other, /, *_deprecated) Return True if the path is relative to another path or False. [extrait de is_relative_to.__doc__]
is_reserved(self) Return True if the path contains one of the special names reserved [extrait de is_reserved.__doc__]
joinpath(self, *pathsegments) Combine this path with one or several arguments, and return a [extrait de joinpath.__doc__]
relative_to(self, other, /, *_deprecated, walk_up=False) Return the relative path to another path identified by the passed [extrait de relative_to.__doc__]
with_name(self, name) Return a new path with the file name changed. [extrait de with_name.__doc__]

Méthodes héritées de la classe PurePathBase

__init_subclass__, __subclasshook__, as_posix, full_match, match, with_segments, with_stem, with_suffix

Méthodes héritées de la classe object

__delattr__, __dir__, __format__, __getattribute__, __getstate__, __reduce_ex__, __setattr__, __sizeof__

Vous êtes un professionnel et vous avez besoin d'une formation ? Mise en oeuvre d'IHM
avec Qt et PySide6
Voir le programme détaillé