housing for code, scripts, urls around web programming and related stuff.
Sunday, December 12, 2010
python - delete file
import os afile = '/filepath/filename' # get absolute path (does not inlcude symlinks, use realpath instead to eliminate symlinks) of the file afile = os.path.abspath(afile) os.remove(afile)
No comments:
Post a Comment