PDA

View Full Version : Can I delete .pyc files safely?



trishacupra
September 12th, 2007, 10:09 AM
Is it okay to delete .pyc files in my filesystem? Thanks.

loell
September 12th, 2007, 11:24 AM
generally the answer is yes :)

bashologist
September 12th, 2007, 11:45 AM
If they appear after you execute something. You shouldn't go around your system deleting random pyc files tho. They're generally used to save time, so if you're debugging a python application it might be a good idea to save them until you're done.

pmasiar
September 12th, 2007, 12:55 PM
.pyc is compiled Python source. You can delete it if you have sources, Python will compile new ones as needed. But sometimes ppl distribute .pyc instead of .py sources, and if you delete them, you may have problem :-)

trishacupra
September 13th, 2007, 02:21 AM
Great, thanks. I was using Kleansweep and it suggested deleting pyc files, but I wasn't sure what they were. :)