Show More
@@ -12,17 +12,13 b' This module requires Python 2.2 or later.' | |||||
12 |
|
12 | |||
13 | URL: http://www.jorendorff.com/articles/python/path |
|
13 | URL: http://www.jorendorff.com/articles/python/path | |
14 | Author: Jason Orendorff <jason.orendorff\x40gmail\x2ecom> (and others - see the url!) |
|
14 | Author: Jason Orendorff <jason.orendorff\x40gmail\x2ecom> (and others - see the url!) | |
15 |
Date: |
|
15 | Date: 9 Mar 2007 | |
16 | """ |
|
16 | """ | |
17 |
|
17 | |||
18 |
|
18 | |||
19 | # TODO |
|
19 | # TODO | |
20 |
# - Tree-walking functions don't avoid symlink loops. Matt Harrison |
|
20 | # - Tree-walking functions don't avoid symlink loops. Matt Harrison | |
21 | # - Tree-walking functions can't ignore errors. Matt Harrison asked for this. |
|
21 | # sent me a patch for this. | |
22 | # |
|
|||
23 | # - Two people asked for path.chdir(). This just seems wrong to me, |
|
|||
24 | # I dunno. chdir() is moderately evil anyway. |
|
|||
25 | # |
|
|||
26 | # - Bug in write_text(). It doesn't support Universal newline mode. |
|
22 | # - Bug in write_text(). It doesn't support Universal newline mode. | |
27 | # - Better error message in listdir() when self isn't a |
|
23 | # - Better error message in listdir() when self isn't a | |
28 | # directory. (On Windows, the error message really sucks.) |
|
24 | # directory. (On Windows, the error message really sucks.) | |
@@ -30,13 +26,12 b' Date: 7 Mar 2004' | |||||
30 | # - Add methods for regex find and replace. |
|
26 | # - Add methods for regex find and replace. | |
31 | # - guess_content_type() method? |
|
27 | # - guess_content_type() method? | |
32 | # - Perhaps support arguments to touch(). |
|
28 | # - Perhaps support arguments to touch(). | |
33 | # - Could add split() and join() methods that generate warnings. |
|
|||
34 |
|
29 | |||
35 | from __future__ import generators |
|
30 | from __future__ import generators | |
36 |
|
31 | |||
37 | import sys, warnings, os, fnmatch, glob, shutil, codecs, md5 |
|
32 | import sys, warnings, os, fnmatch, glob, shutil, codecs, md5 | |
38 |
|
33 | |||
39 |
__version__ = '2. |
|
34 | __version__ = '2.2' | |
40 | __all__ = ['path'] |
|
35 | __all__ = ['path'] | |
41 |
|
36 | |||
42 | # Platform-specific support for path.owner |
|
37 | # Platform-specific support for path.owner | |
@@ -389,6 +384,7 b' class path(_base):' | |||||
389 | "Unable to list directory '%s': %s" |
|
384 | "Unable to list directory '%s': %s" | |
390 | % (self, sys.exc_info()[1]), |
|
385 | % (self, sys.exc_info()[1]), | |
391 | TreeWalkWarning) |
|
386 | TreeWalkWarning) | |
|
387 | return | |||
392 | else: |
|
388 | else: | |
393 | raise |
|
389 | raise | |
394 |
|
390 | |||
@@ -439,6 +435,7 b' class path(_base):' | |||||
439 | "Unable to list directory '%s': %s" |
|
435 | "Unable to list directory '%s': %s" | |
440 | % (self, sys.exc_info()[1]), |
|
436 | % (self, sys.exc_info()[1]), | |
441 | TreeWalkWarning) |
|
437 | TreeWalkWarning) | |
|
438 | return | |||
442 | else: |
|
439 | else: | |
443 | raise |
|
440 | raise | |
444 |
|
441 | |||
@@ -469,6 +466,7 b' class path(_base):' | |||||
469 | "Unable to list directory '%s': %s" |
|
466 | "Unable to list directory '%s': %s" | |
470 | % (self, sys.exc_info()[1]), |
|
467 | % (self, sys.exc_info()[1]), | |
471 | TreeWalkWarning) |
|
468 | TreeWalkWarning) | |
|
469 | return | |||
472 | else: |
|
470 | else: | |
473 | raise |
|
471 | raise | |
474 |
|
472 | |||
@@ -478,12 +476,13 b' class path(_base):' | |||||
478 | isdir = not isfile and child.isdir() |
|
476 | isdir = not isfile and child.isdir() | |
479 | except: |
|
477 | except: | |
480 | if errors == 'ignore': |
|
478 | if errors == 'ignore': | |
481 |
|
|
479 | continue | |
482 | elif errors == 'warn': |
|
480 | elif errors == 'warn': | |
483 | warnings.warn( |
|
481 | warnings.warn( | |
484 | "Unable to access '%s': %s" |
|
482 | "Unable to access '%s': %s" | |
485 | % (self, sys.exc_info()[1]), |
|
483 | % (self, sys.exc_info()[1]), | |
486 | TreeWalkWarning) |
|
484 | TreeWalkWarning) | |
|
485 | continue | |||
487 | else: |
|
486 | else: | |
488 | raise |
|
487 | raise | |
489 |
|
488 |
@@ -1,3 +1,7 b'' | |||||
|
1 | 2007-03-23 Walter Doerwald <walter@livinglogic.de> | |||
|
2 | ||||
|
3 | * IPython/Extensions/path.py: Updated to version 2.2. | |||
|
4 | ||||
1 | 2007-03-23 Ville Vainio <vivainio@gmail.com> |
|
5 | 2007-03-23 Ville Vainio <vivainio@gmail.com> | |
2 |
|
6 | |||
3 | * iplib.py: recursive alias expansion now works better, so that |
|
7 | * iplib.py: recursive alias expansion now works better, so that |
General Comments 0
You need to be logged in to leave comments.
Login now