Message78418
| Author | mrts |
|---|---|
| Recipients | mrts, pitrou |
| Date | 2008-12-28.16:38:34 |
| SpamBayes Score | 4.3323674e-09 |
| Marked as misclassified | No |
| Message-id | <1230482315.85.0.29725439028.issue4489@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
> Mmmh, the problem with Perl's approach is that it changes the current
> working directory (calls to chdir()), which is process-specific and not
> thread-specific. Currently, no function in shutil changes the current
> working directory, which is a nice behaviour and should IMO be preserved.
Using chdir() makes sense and it doesn't look like a too big problem to me:
def rmtree(...):
...
curdir = os.getcwd()
try:
call chdir() as required
finally:
try:
os.chdir(curdir)
except:
warnings.warn("Unable to chdir to previous current dir")
... |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008-12-28 16:38:35 | mrts | set | recipients: + mrts, pitrou |
| 2008-12-28 16:38:35 | mrts | set | messageid: <1230482315.85.0.29725439028.issue4489@psf.upfronthosting.co.za> |
| 2008-12-28 16:38:35 | mrts | link | issue4489 messages |
| 2008-12-28 16:38:34 | mrts | create | |