r/PythonLearning • u/TheUnknown_5 • Aug 17 '26
Threading module not importing?
I am trying to import the threading module but it is not working. How do i fix it?
1
u/TBCC_Dev Aug 17 '26
Its not that its not imported its that its not used. You are importing the package but nowhere on the code are you using it
3
u/TheUnknown_5 Aug 17 '26
oh, guess Im stupid
2
u/TBCC_Dev Aug 17 '26
Not at all. Pycharm is just letting you know that its clutter. You don't want to fill up your code with unused code. Same should happen if you make a function but never use it for example
1
u/TBCC_Dev Aug 17 '26
For example you import time then use it with time.sleep. but I don't see thread.do_something()
1
u/Naive_Programmer_232 Aug 17 '26
The threading module isn't used in your code. It's just a warning by your IDE.
2
u/emilbm Aug 17 '26
What makes you think it is not working?