Python - 068 : Locate a module in python

Pubblicato il: 25 luglio 2023
sul canale di: The Digital Folks
875
14

Locating a module means finding the directory from which the module is imported. When we import a module the Python interpreter searches for the module in the following manner:

First, it searches for the module in the current directory.
If the module isn’t found in the current directory, Python then searches each directory in the shell variable PYTHONPATH. The PYTHONPATH is an environment variable, consisting of a list of directories.
If that also fails python checks the installation-dependent list of directories configured at the time Python is installed.


In questa pagina del sito puoi guardare il video online Python - 068 : Locate a module in python della durata di ore minuti seconda in buona qualità , che l'utente ha caricato The Digital Folks 25 luglio 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 875 volte e gli è piaciuto 14 spettatori. Buona visione!