##// END OF EJS Templates
import-checker: normalize directory separator to get module name on Windows...
Yuya Nishihara -
r27620:0c60843b default
parent child Browse files
Show More
@@ -61,7 +61,7 b' def dotted_name_of_path(path, trimpure=F'
61 >>> dotted_name_of_path('zlibmodule.so')
61 >>> dotted_name_of_path('zlibmodule.so')
62 'zlib'
62 'zlib'
63 """
63 """
64 parts = path.split('/')
64 parts = path.replace(os.sep, '/').split('/')
65 parts[-1] = parts[-1].split('.', 1)[0] # remove .py and .so and .ARCH.so
65 parts[-1] = parts[-1].split('.', 1)[0] # remove .py and .so and .ARCH.so
66 if parts[-1].endswith('module'):
66 if parts[-1].endswith('module'):
67 parts[-1] = parts[-1][:-6]
67 parts[-1] = parts[-1][:-6]
@@ -180,7 +180,7 b' def list_stdlib_modules():'
180 for m in ['msvcrt', '_winreg']:
180 for m in ['msvcrt', '_winreg']:
181 yield m
181 yield m
182 # These get missed too
182 # These get missed too
183 for m in 'ctypes', 'ctypes.util', 'email', 'logging', 'multiprocessing':
183 for m in 'ctypes', 'email', 'logging', 'multiprocessing':
184 yield m
184 yield m
185 yield 'builtins' # python3 only
185 yield 'builtins' # python3 only
186 for m in 'fcntl', 'grp', 'pwd', 'termios': # Unix only
186 for m in 'fcntl', 'grp', 'pwd', 'termios': # Unix only
General Comments 0
You need to be logged in to leave comments. Login now