The .pyc files are cluttering my tree view and I need them to be hidden. But how?
Pattern for hidden files can be configured from settings panel in
tree>hidden files pattern
it hides pyc files by default, so likely you have enabled show hidden files from tree options menu