You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The glasgow.platform module shadows the platform module from the standard Python library. This is problematic when importing libusb1 (import usb1) from an interpreter launched from the glasgow module:
AttributeError: module 'platform' has no attribute 'system'
May I suggest to rename the platform module to platform_?
The text was updated successfully, but these errors were encountered:
DurandA
changed the title
platform module shadows standard lib
glasgow.platform module shadows standard lib
Mar 5, 2020
Why are you running an interpreter from within the glasgow module? It's namespaced under glasgow. toplevel module specifically to prevent this sort of problem.
I just thought that it was kind of evil to name modules after modules from standard lib.
Evil? Future versions of Python can add new modules to standard library. Am I supposed to avoid those names, too? I didn't even realize there is a platform module.
The
glasgow.platform
module shadows theplatform
module from the standard Python library. This is problematic when importing libusb1 (import usb1
) from an interpreter launched from theglasgow
module:May I suggest to rename the
platform
module toplatform_
?The text was updated successfully, but these errors were encountered: