I did a quick test creating and symlinking a file in bash, then calling unlink in Python, and finally looking at the results again from bash.  The source file appears to remain untouched.  Complete bash and python steps:<div>
<br></div><div><div>brent@mae ~/tmp $ touch blah</div><div>brent@mae ~/tmp $ ls -l</div><div>total 0</div><div>-rw-r--r-- 1 brent brent 0 2010-04-30 14:46 blah</div><div>brent@mae ~/tmp $ ln -s blah blahlink</div><div>brent@mae ~/tmp $ ls -l</div>
<div>total 0</div><div>-rw-r--r-- 1 brent brent 0 2010-04-30 14:46 blah</div><div>lrwxrwxrwx 1 brent brent 4 2010-04-30 14:46 blahlink -&gt; blah</div><div>brent@mae ~/tmp $ ipython</div><div><br></div><div>In [1]: import os</div>
<div><br></div><div>In [2]: os.unlink(&#39;blahlink&#39;)</div><div><br></div><div>In [3]: </div><div>Do you really want to exit ([y]/n)? </div><div>brent@mae ~/tmp $ ls -l</div><div>total 0</div><div>-rw-r--r-- 1 brent brent 0 2010-04-30 14:46 blah</div>
<div><br></div></div><div>Hope that helps!</div><div>Brent</div><div><br></div><div><div class="gmail_quote">On Fri, Apr 30, 2010 at 1:52 PM, Keith Dart <span dir="ltr">&lt;<a href="mailto:keith@dartworks.biz">keith@dartworks.biz</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">=== On Fri, 04/30, Glen Jarvis wrote: ===<br>
<div class="im">&gt; Is os.unlink() guaranteed to touch the symlink only?   Also,<br>
&gt; semantically, is this &quot;unlinking&quot; a hard unlinking and therefore the<br>
&gt; same as remove (i.e., which would be easier for someone who is<br>
&gt; reading the code to understand/yet still be accurate).<br>
<br>
</div>===<br>
<br>
That is just wrapper for the unlink stdlib function.<br>
<div class="im"><br>
man 2 unlink says:<br>
<br>
 If the name referred to a symbolic link the link is removed.<br>
<br>
</div>You can also do a little test to verify it.<br>
<br>
<br>
<br>
-- Keith Dart<br>
<font color="#888888"><br>
--<br>
-- --------------------<br>
Keith Dart<br>
&lt;<a href="mailto:keith@dartworks.biz">keith@dartworks.biz</a>&gt;<br>
=======================<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Baypiggies mailing list<br>
<a href="mailto:Baypiggies@python.org">Baypiggies@python.org</a><br>
To change your subscription options or unsubscribe:<br>
<a href="http://mail.python.org/mailman/listinfo/baypiggies" target="_blank">http://mail.python.org/mailman/listinfo/baypiggies</a><br>
</div></div></blockquote></div><br></div>