[issue17131] subprocess.Popen.terminate can raise exception on Posix

2013-02-05 Thread S Arrowsmith
New submission from S Arrowsmith: Compare this with the script in #14252: p = Popen(['/bin/sleep', '1']) time.sleep(1) p.terminate() print p.poll() p.terminate() Output is: 0 Traceback (most recent call last): File "", line 1, in File "/usr/lib/pyth

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2010-06-30 Thread S Arrowsmith
S Arrowsmith added the comment: That solution looks sound to me, in particular documenting the semantics of repeated init() calls! As for the underlying problem, it seems to me that an alternative to copying the existing structures rather than rebuilding them would be to use OrderedDicts

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2010-06-28 Thread S Arrowsmith
S Arrowsmith added the comment: I've dug into it -- again -- and my original analysis still holds. Getting consistent guess_extension() results across an explicit init() call depends on dict.items() returning keys in the same order on two different dictionaries (the original, hard-

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2010-06-26 Thread S Arrowsmith
S Arrowsmith added the comment: >>> import mimetypes >>> mimetypes.guess_extension('image/jpeg') /etc/mime.types '.jpe' >>> mimetypes.init() /etc/mime.types >>> mimetypes.guess_extension('imag

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2010-06-26 Thread S Arrowsmith
S Arrowsmith added the comment: Sorry, still there: Python 2.7rc2 (r27rc2:82137, Jun 26 2010, 11:27:59) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mimetypes >>> mimetyp

[issue6925] Doc for locals and vars

2009-09-17 Thread S Arrowsmith
Changes by S Arrowsmith : -- nosy: +siona ___ Python tracker <http://bugs.python.org/issue6925> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2009-01-16 Thread S Arrowsmith
S Arrowsmith added the comment: Ah, yes, forgot to mention this is on Debian 4.0. I doubt you're going to run into it on a Windows system unless you explicitly give init() a mime.types file, looking at the knownfiles list used by default. ___ Python tr

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2009-01-16 Thread S Arrowsmith
New submission from S Arrowsmith : Asking mimetypes to reload mime.types can cause guess_extension() to return a different result if multiple extensions are mapped to that mime type: >>> import mimetypes >>> mimetypes.guess_extension('image/jpeg'