Hiding files of a certain extension (.pyc) from Nautilus

I would like to hide every .pyc file from Nautilus. I use Ubuntu 10.04.

What could I do?


One option would be to not create these files at all. See this thread https://stackoverflow.com/questions/154443/how-to-avoid-pyc-files

You can also quickly delete these files from Nautilus by pressing ctrl+s, entering *.pyc pattern and hitting delete key.


Just need to open a bash terminal and run:

ls *.py[co] >> .hidden

bingo!


You can add all the .pyc filenames to a .hidden file in the same directory. Requires some maintenance, but if you're like me you do a lot more modifying of existing files than creating new ones.