[issue24185] Add Function for Sending File to Trash (or Recycling Bin)
New submission from Taylor Marks: When you have a file that you don't think you need anymore, the proper thing to do with it is move it to the Trash (or Recycling Bin, if you're on Windows.) The standard library, however, doesn't offer any way of doing this currently. Instead, the only thing it offers is the ability to delete files. Deleting files is a potentially dangerous operation. A novice programmer may end up carelessly delete the wrong file. I would suggest adding in a new function which allows for cross-platform moving of files to trash. It could go into the existing shutil or os modules. Or it could get its own module (like glob). It could be based upon (or even be exactly) this implementation: https://pypi.python.org/pypi/Send2Trash https://github.com/hsoft/send2trash Afterwards, the docs for os.remove and shutil.rmtree could have a warning added that suggests that instead of using such dangerous functions, it may be best for the user to use the new function. (If this is not the place to propose additions to the standard library, please redirect me for where I should go instead. PEP 5 covers how the language should evolve, but then only has a link to bugs.python.org.) -- components: Library (Lib) messages: 243149 nosy: Taylor.Marks priority: normal severity: normal status: open title: Add Function for Sending File to Trash (or Recycling Bin) type: enhancement versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2889] curses for windows (alternative patch)
Taylor Marks added the comment: Python is supposed to be cross platform. This has been a major incompatibility issue between Windows and *nix and you think this patch, which has been ready for nearly 7 years now, should simply get discarded because the fix is available from pip? I think there are two possible remedies to this: - Accept this patch. - Remove curses from the Python standard library for *nix (breaks backwards compatibility for *nix, but fixes compatibility between Windows and *nix going forward.) -- nosy: +Taylor.Marks ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2889 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22912] urlretreive locks up in 2.7.8
New submission from Taylor Marks: The following code causes Python 2.7.8 to lockup for ten minutes, then crash, in both Windows 7 and OS X: from urllib import urlretrieve urlretrieve('http://chromedriver.storage.googleapis.com/2.12/chromedriver_win32.zip', 'chromedriver_win32.zip') Here's a thread on StackOverflow where I originally posted about this bug, assuming it was an issue in my code, before other people let me know that the problem wasn't my code, but with Python 2.7.8, on both Windows 7 and OS X, and that in older versions of Python, such as 2.7.6, the code works fine. http://stackoverflow.com/questions/27025998/urllib-urlretreive-completely-locks-up-python -- components: Library (Lib) messages: 231492 nosy: TaylorSMarks priority: normal severity: normal status: open title: urlretreive locks up in 2.7.8 type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22912 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22551] Anything results in a SyntaxError after -i -u -c on 2.7.8 on Windows 7
New submission from Taylor Marks: On Python 2.7.8, on Windows 7, if I start up the Python interactive console using the flags -i -u -c, nothing else will be considered valid syntax from that point forward. My understanding is: -i tells Python to enter interactive mode after it's done running whatever else it's told to do -u tells Python to not buffer output -c tells Python to treat any further arguments as Python code and to run it None of these flags should be causing the issues that I'm seeing, I don't think. Example: $ python -i -u -c print('Test') Test print('verify') File stdin, line 1 print('verify') ^ SyntaxError: invalid syntax This doesn't occur on my computer running OS X Mavericks (10.9.4) and Python 2.7.6 which leads me to think this may be a platform or version specific issue... -- components: Interpreter Core, Windows messages: 228373 nosy: Taylor.Marks priority: normal severity: normal status: open title: Anything results in a SyntaxError after -i -u -c on 2.7.8 on Windows 7 type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22551 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22551] Anything results in a SyntaxError after -u on 2.7.8 on Windows 7
Taylor Marks added the comment: I checked a few other combinations of flags: -i -c works fine. -u has the same issue as described in my opening message. This occurs in both cmd and PowerShell, running as admin. -- title: Anything results in a SyntaxError after -i -u -c on 2.7.8 on Windows 7 - Anything results in a SyntaxError after -u on 2.7.8 on Windows 7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22551 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22551] Anything results in a SyntaxError after -u on 2.7.8 on Windows 7
Taylor Marks added the comment: Sorry for multiple consecutive posts... I don't see a way to edit prior posts. The stack trace I posted in my first message has the arrow in the wrong spot. It should actually be pointing to the first space after the closing brace. Here's a simpler (and correct) stack trace: $ python -u print(Test) File stdin, line 1 print(Test) ^ SyntaxError: invalid syntax -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22551 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22551] Anything results in a SyntaxError after -u on 2.7.8 on Windows 7
Taylor Marks added the comment: I found someone else describing the same behavior in 2.4 here, I guess the conclusion is it isn't a bug: http://bytes.com/topic/python/answers/162599-windows-python-2-4-unbuffered-flag-causes-syntaxerror-interactive-sessions -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22551 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com