Created
January 25, 2014 18:15
-
-
Save Jhenxu/8620915 to your computer and use it in GitHub Desktop.
rm all
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We often get strange errors with python. When you changing the source and cannot figure out why files are used from past. So if you ever get this dejavu feeling, try using this command: | |
``` | |
find . -type f -name '*.pyc' -exec rm {} \; | |
``` | |
It will delete all precompiled python sources. (Because with python you have ability to distribute your files in binaries in fact.) Those errors usually appear if you move/delete *.py files with version control. You usually exclude *.pyc files from list. Old links used this way. Debugger does not suggest wrong imports because your files are in fact there, just precompiled. | |
Anyway I've just put this command to my blog for memorizing. It often helps me. Maybe it can for you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment