Advertisement
rfmonk

shutil_move.py

Jan 28th, 2014
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3.  
  4. from shutil import *
  5. from glob import glob
  6.  
  7. with open('example.txt', 'wt') as f:
  8.     f.write('contents')
  9.  
  10. print 'BEFORE: ', glob('example*')
  11. move('example.txt', 'example.out')
  12. print 'AFTER : ', glob('example*')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement