homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jaraco
Recipients alexreg, brian.curtin, eric.smith, jaraco, tim.golden
Date 2011年11月15日.22:54:22
SpamBayes Score 5.93371e-06
Marked as misclassified No
Message-id <1321397664.08.0.984828489835.issue13412@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011年11月15日 22:54:24jaracosetrecipients: + jaraco, eric.smith, tim.golden, brian.curtin, alexreg
2011年11月15日 22:54:24jaracosetmessageid: <1321397664.08.0.984828489835.issue13412@psf.upfronthosting.co.za>
2011年11月15日 22:54:23jaracolinkissue13412 messages
2011年11月15日 22:54:22jaracocreate

AltStyle によって変換されたページ (->オリジナル) /