Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # in all these shutil examples
- # it appears most of the imports aren't
- # needed. why is this?
- # for instance in both from ...* I receive error
- # from pyflakes unable to detect undefined names
- # My guess is these are needed on non UNIX systems idk
- # or maybe a versioning diff
- from shutil import *
- from commands import *
- import os
- with open('file_to_change.txt', 'wt') as f:
- f.write('content')
- os.chmod('file_to_change.txt', 0444)
- print 'BEFORE:'
- print getstatus('file_to_change.txt')
- copymode('shutil_copymode.py', 'file_to_change.txt')
- print 'AFTER :'
- print getstatus('file_to_change.txt')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement