Message311373
| Author | emilyemorehouse |
|---|---|
| Recipients | craigh, emilyemorehouse, yan12125 |
| Date | 2018-01-31.21:04:15 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1517432655.65.0.467229070634.issue32689@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Ah, you're right. That was a typo when I was redacting my full path. The path object remains unchanged even though the directory has moved.
Should have been:
>>> import os, pathlib, shutil
>>> os.mkdir('test1')
>>> os.mkdir('test2')
>>> path = pathlib.Path('test1')
>>> path.absolute()
PosixPath('/Users/e/Development/OSS/cpython/test1')
>>> shutil.move(path, 'test2')
'test2/test1'
>>> path.absolute()
PosixPath('/Users/e/Development/OSS/cpython/test1')
test1 is now actually at '/Users/e/Development/OSS/cpython/test2/test1' |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2018-01-31 21:04:15 | emilyemorehouse | set | recipients: + emilyemorehouse, craigh, yan12125 |
| 2018-01-31 21:04:15 | emilyemorehouse | set | messageid: <1517432655.65.0.467229070634.issue32689@psf.upfronthosting.co.za> |
| 2018-01-31 21:04:15 | emilyemorehouse | link | issue32689 messages |
| 2018-01-31 21:04:15 | emilyemorehouse | create | |