Message111222
| Author |
jaraco |
| Recipients |
brian.curtin, eric.smith, jaraco |
| Date |
2010年07月22日.22:18:34 |
| SpamBayes Score |
2.2672504e-07 |
| Marked as misclassified |
No |
| Message-id |
<1279837121.8.0.574684205998.issue9333@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I think we should consider simply calling this function before running os.symlink. It would be nice if the API were as compatible as possible on both unix and Windows.
My worry is that where code that works on unix systems is simply:
os.symlink(...)
But now to support symlinks on Windows, one must write:
if hasattr(os, 'enable_symlink') and not os.enable_symlink():
raise WindowsError(...)
os.symlink(...)
Maybe instead of adding os.enable_symlink, Python should include the above logic before attempting to create a symlink and raise an exception if it fails? This would provide a consistent API across platforms for the most common use-case. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年07月22日 22:18:41 | jaraco | set | recipients:
+ jaraco, eric.smith, brian.curtin |
| 2010年07月22日 22:18:41 | jaraco | set | messageid: <1279837121.8.0.574684205998.issue9333@psf.upfronthosting.co.za> |
| 2010年07月22日 22:18:34 | jaraco | link | issue9333 messages |
| 2010年07月22日 22:18:34 | jaraco | create |
|