[ python-Bugs-1395442 ] os.remove should behave like rm, not unlink

SourceForge.net noreply at sourceforge.net
Mon Jan 2 18:22:15 CET 2006


Bugs item #1395442, was opened at 2006-01-02 11:51
Message generated for change (Comment added) made by whit537
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1395442&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
>Status: Deleted
Resolution: None
Priority: 5
Submitted By: Chad Whitacre (whit537)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.remove should behave like rm, not unlink

Initial Comment:
Description
===========
As expected, os.unlink only removes the file reference
explicitly named, so if you have multiple links to the
same file, os.unlink leaves those not named. However, I
would expect os.remove to be equivalent to rm --
removing all references -- but it is a straight alias
for os.unlink. 


Environment
===========
Python 2.4.2
FreeBSD 4.11


Steps to Reproduce
==================
$ touch foo
$ ls -i
1689942 foo
$ ln foo bar
$ ls -i
1689942 bar     1689942 foo
$ python -c 'import os; os.remove("bar")'
$ l -i


Expected Result
===============
$ 


Actual Result
=============
1689942 foo
$ 


----------------------------------------------------------------------

>Comment By: Chad Whitacre (whit537)
Date: 2006-01-02 12:22

Message:
Logged In: YES 
user_id=340931

Nevermind, that's not how rm behaves. *blush*

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1395442&group_id=5470


More information about the Python-bugs-list mailing list