Python os.path is ntpath, how? -


Can someone tell me how the Python "aliases" os.path to Ntpath ?

  & gt; & Gt; & Gt; Import os.path & gt; & Gt; & Gt; Os.path & lt; Module 'ntpath' to 'C: \ Python26 \ lib \ ntpath.pyc' & gt; & Gt; & Gt; & Gt;  

see, line 55-67:

  Try aliof 'NT' _ in names: name = 'nt' linesep = '\ r \ n' nt import *: Import import outside of import exchanges: import as import path ntpath path import nt __all __ . Extend (_get_exports_list (nt)) del nt  

Import ntpath as a path is a specific statement which is os.path Ho ntpath on your platform (undoubtedly Windows).


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -