Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- #
- """
- BEFORE:
- ls: cannot access /tmp/example: No such file or directory
- Traceback (most recent call last):
- File "shutil_copytree.py", line 9, in <module>
- copytree('../shutil', '/tmp/example')
- File "/usr/lib/python2.7/shutil.py", line 171, in copytree
- names = os.listdir(src)
- OSError: [Errno 2] No such file or directory: '../shutil'
- """
- from shutil import *
- from commands import *
- print 'BEFORE:'
- print getoutput('ls -rlast /tmp/example')
- copytree('../shutil', '/tmp/example')
- print '\nAFTER:'
- print getoutput('ls -rlast /tmp/example')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement