[issue21539] pathlib's Path.mkdir() should allow for mkdir -p functionality
New submission from Jim Garrison: As of Python 3.2, `os.makedirs()` takes `exist_ok` as a keyword argument. If set to true, the function does not raise an error if the directory already exists. This makes the function's behavior similar to `mkdir -p` on the UNIX commandline. (See https://docs.python.org/3/library/os.html#os.makedirs) However, this functionality is missing in Python's new pathlib. In fact, the documentation for `Path.mkdir()` even mentions that if `parent=True` is passed, then it should behave like `mkdir -p`. This is accurate in that it indeed recursively makes any parent directories necessary, but it is inaccurate in that it raises an error if the directory already exists. I propose that either `parents=True` should imply that there is no error if the directory already exists (which would be a backwards-incompatible change); or, there could be a new `exist_ok=True`, which could suppress the error for an existing directory. Either way, it ought to be possible to get the `mkdir -p` functionality easily from pathlib. And the documentation for `Path.mkdir()` should be updated to explain how to get this `mkdir -p` functionality, with the existing (inaccurate) `mkdir -p` mention removed. -- components: Library (Lib) messages: 218832 nosy: garrison priority: normal severity: normal status: open title: pathlib's Path.mkdir() should allow for mkdir -p functionality type: enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21539 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements
Jim Garrison jgarri...@troux.com added the comment: To clarify: ... it should never alter the content of (i.e. insert whitespace into) existing text elements that contain non-whitespace characters. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements
Jim Garrison jgarri...@troux.com added the comment: Also needed here. While pretty-printing should be able to insert non-significant whitespace BETWEEN xml elements, it should never alter the content of (i.e. insert whitespace into) existing text elements. -- nosy: +jgarrison ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5674] distutils fails to find Linux libs (lib.....so.n)
New submission from Jim Garrison jgarri...@troux.com: Trying to build 3.1a1 on Fedora 9, the following extensions get skipped even though the requisite packages are installed _dbm _gdbm _hashlib _sqlite3 _ssl bz2 readline zlib After looking at the code in distutils I *think* the problem is because setup.py isn't coping with library filenames such as libreadline.so.5 and libgdm.so.2 (with the .n) second extension. It looks like ccompiler.py#library_filename() just appends the extension, which is .so for unix, and then unixccompiler.py#find_library_file() does a simple os.path.exists() on the name, not allowing for the additional numeric extension. Note that some library filenames in Linux have two or even three such extensions, as in libreadline.so.5.2, and some extensions are not all-numeric, as in libssl.so.0.9.8g. -- assignee: tarek components: Distutils messages: 85268 nosy: jgarrison, tarek severity: normal status: open title: distutils fails to find Linux libs (lib.so.n) type: compile error versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5674 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com