console icon indicating copy to clipboard operation
console copied to clipboard

Exported utils module in __init__.py

Open nocturn9x opened this issue 3 years ago • 2 comments

The utils module of console is mentioned in a stackoverflow answer about waiting for key presses, but it's actually not exported outside the package so it's unusable :P

nocturn9x avatar Feb 06 '22 12:02 nocturn9x

Probably this article here.

rasa avatar Feb 10 '23 01:02 rasa

Huh? Modules don't need to be exported in Python, init imports are usually just done for convenience of importing without the (sub)module name.

>>> import console.utils
>>> 
>>> from console import utils
>>> 
>>> utils.wait_key()
'y'

Does this not work for you? Would like to see the error, maybe in an issue/bug.

Thanks for your interest.

mixmastamyk avatar Feb 10 '23 18:02 mixmastamyk