[issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows
Philip Lee added the comment: To reproduce the reported issue, one could also test with ffmpeg.exe -- ___ Python tracker <https://bugs.python.org/issue30082> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19081] zipimport behaves badly when the zip file changes while the process is running
Philip Lee added the comment: The issue still remains in Python 3.8. -- nosy: +iMath versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker <https://bugs.python.org/issue19081> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19081] zipimport behaves badly when the zip file changes while the process is running
Philip Lee added the comment: and I got ZipImportError: bad local file header -- ___ Python tracker <https://bugs.python.org/issue19081> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30023] Example code becomes invalid for "Why do lambdas defined in a loop with different values all return the same result?"
New submission from Philip Lee: There example code here becomes invalid https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result >>> squares = [] >>> for x in range(5): squares.append(lambda: x**2) >>> squares [ at 0x01FB7A08>, at 0x01F82390>, at 0x01FBA3D8>, at 0x01FBA420>, at 0x01FBA468>] >>> There returned value is a List of lambda functions, not numbers -- assignee: docs@python components: Documentation messages: 291353 nosy: docs@python, iMath priority: normal severity: normal status: open title: Example code becomes invalid for "Why do lambdas defined in a loop with different values all return the same result?" type: enhancement versions: Python 3.6 ___ Python tracker <http://bugs.python.org/issue30023> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30079] Explain why it is recommended to pass args as a string rather than as a sequence If shell is True
New submission from Philip Lee: The doc here https://docs.python.org/3/library/subprocess.html#subprocess.Popen says : "If shell is True, it is recommended to pass args as a string rather than as a sequence." but without explain why ? Please add the explanation ! while in https://docs.python.org/3/library/subprocess.html#frequently-used-arguments says: "args is required for all calls and should be a string, or a sequence of program arguments. Providing a sequence of arguments is generally preferred, as it allows the module to take care of any required escaping and quoting of arguments (e.g. to permit spaces in file names). If passing a single string, either shell must be True (see below) or else the string must simply name the program to be executed without specifying any arguments." In the case of shell =True , I found providing a sequence of arguments rather than a string argument can take the advantage of auto escaping and quoting of arguments (e.g. to permit spaces in file names) , so what is the advantage of pass args as a string rather than as a sequence as says in the doc when shell is True? -- assignee: docs@python components: Documentation messages: 291733 nosy: docs@python, iMath priority: normal severity: normal status: open title: Explain why it is recommended to pass args as a string rather than as a sequence If shell is True type: enhancement ___ Python tracker <http://bugs.python.org/issue30079> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows
New submission from Philip Lee: First, It is nearly useless for the command prompt to pop up during the running time of subprocess.Popen with shell=False. Second, the popping up command prompt would interrupt users and do bad to user experience of GUI applications. Third, I found QProcess within Qt won't pop up the command prompt in using. It would be convenient to add an argument to suppress the command prompt from popping up when using subprocess.Popen with shell=False on Windows, many users are missing the feature and these are many similar feature request questions like the following http://stackoverflow.com/questions/7006238/how-do-i-hide-the-console-when-i-use-os-system-or-subprocess-call http://stackoverflow.com/questions/1765078/how-to-avoid-console-window-with-pyw-file-containing-os-system-call/12964900#12964900 http://stackoverflow.com/questions/1016384/cross-platform-subprocess-with-hidden-window -- components: Library (Lib) messages: 291760 nosy: iMath priority: normal severity: normal status: open title: hide command prompt when using subprocess.Popen with shell=False on Windows type: enhancement ___ Python tracker <http://bugs.python.org/issue30082> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34221] Any plans to combine collections.OrderedDict with dict
Philip Lee added the comment: What about my last suggestion : it would be better to move "Dictionaries preserve insertion order" part at the end of the doc of https://docs.python.org/3/library/stdtypes.html#dict up below the doc for class dict(**kwarg) class dict(mapping, **kwarg) class dict(iterable, **kwarg) so that people won't miss the feature when consulting the doc. 在2018年07月26 14时46分, "Raymond Hettinger"写道: Raymond Hettinger added the comment: See the related discussion on python-dev and other tracker entries where this was discussed previously. -- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue34221> ___ -- nosy: +iMath ___ Python tracker <https://bugs.python.org/issue34221> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29074] repr doesn't give full result for this re math result
Philip Lee added the comment: I think so, the current behavior is misleading 在2016年12月27 00时08分, "R. David Murray"写道: R. David Murray added the comment: If it is truncated, should it end with '...' or [...]? -- nosy: +r.david.murray ___ Python tracker <http://bugs.python.org/issue29074> ___ -- nosy: +iMath ___ Python tracker <http://bugs.python.org/issue29074> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
Philip Lee added the comment: I use the following django view function also produce the same exception def sendFiles(request): fileName = request.GET['fileName'] pathToFile = os.path.join(filesDir, fileName) response = FileResponse(open(pathToFile, 'rb')) response['Content-Type'] = 'application/octet-stream' response[ 'Content-Disposition'] = 'attachment; fileName="{}"'.format(fileName) response['Content-Length'] = os.path.getsize(pathToFile) # HttpResponse(open(os.path.join(os.getcwd(), 'LYYDownloaderServer.log'), 'r'), content_type='text/plain') return response Tested with sending file Git-2.8.4-32-bit.exe (29.8MB), if tested with sending file GitHubSetup.exe(670kb),then no exception occurred. the exception like the following return self._sock.send(b) ConnectionAbortedError: [WinError 10053] 您的主机中的软件中止了一个已建立的连接 。 [09/Aug/2016 10:30:13] "GET /FileHost/?fileName=Git-2.8.4-32-bit.exe HTTP/1.1" 5 00 59 Exception happened during processing of request from ('127.0.0.1', 62237) Traceback (most recent call last): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 138, in run self.finish_response() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 180, in finish_response self.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 274, in write self.send_headers() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 332, in send_headers self.send_preamble() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 255, in send_preamble ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1') File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 453, in _write result = self.stdout.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socket.py", lin e 593, in write return self._sock.send(b) ConnectionAbortedError: [WinError 10053] 您的主机中的软件中止了一个已建立的连接 。 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 141, in run self.handle_error() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\site-packages\d jango\core\servers\basehttp.py", line 92, in handle_error super(ServerHandler, self).handle_error() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 368, in handle_error self.finish_response() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 180, in finish_response self.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 274, in write self.send_headers() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 331, in send_headers if not self.origin_server or self.client_is_modern(): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 344, in client_is_modern return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9' TypeError: 'NoneType' object is not subscriptable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py ", line 625, in process_request_thread self.finish_request(request, client_address) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py ", line 354, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\site-packages\d jango\core\servers\basehttp.py", line 99, in __init__ super(WSGIRequestHandler, self).__init__(*args, **kwargs) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py ", line 681, in __init__ self.handle() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\site-packages\d jango\core\servers\basehttp.py", line 179, in handle handler.run(self.server.get_app()) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 144, in run self.close() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\simple_ server.py", line 36, in close self.sta
[issue23039] File name restriction on Windows
New submission from Philip Lee: when using open(filename, 'w') on Windows , File names are not allowed to contain any characters in \/:*?"<>| , however open(filename, 'w') doesn't throw any exceptions when the file name contains these characters . I think some warning should be written in the documentation or exceptions thrown should happen when the file name contains these characters . -- components: IO messages: 232555 nosy: iMath priority: normal severity: normal status: open title: File name restriction on Windows type: enhancement ___ Python tracker <http://bugs.python.org/issue23039> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com