Jason R. Coombs <jar...@jaraco.com> added the comment:

Python 2.7 is not aware of symlinks and treats them like their targets, so it 
should be able to list a symlink directory or access a file within one. For 
example:

PS C:\Users\jaraco> cmd /c dir
 Volume in drive C is system
 Volume Serial Number is 2455-92A0

 Directory of C:\Users\jaraco

11-Nov-2011  06:50    <DIR>          .
11-Nov-2011  06:50    <DIR>          ..
..
11-Aug-2011  10:11    <SYMLINKD>     bin [Dropbox\bin\x64]
10-Aug-2011  21:00    <SYMLINKD>     bin-x86 [Dropbox\bin\x86]
..
              11 File(s)          6,632 bytes
              27 Dir(s)  301,972,422,656 bytes free
PS C:\Users\jaraco> python
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.listdir('bin')
['curl.exe', 'devcon.exe', 'HotSwap!.EXE', 'Notepad2.exe', 'utorrent.exe', 
'vncviewer.exe']
>>> with open('bin/curl.exe', 'rb') as f:
...   f.read()[:10]
...
'MZ\x90\x00\x03\x00\x00\x00\x04\x00'
>>> ^Z

Because Python 2.7 is feature-frozen, symlink support will not be available in 
Python before 3.2.

If you are experiencing errors, please reopen this ticket and describe what you 
are doing, what you expect, and what you get instead.

----------
resolution:  -> wont fix
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13412>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to