Re: Survey -- Move To Trash function in Python?

2015-05-18 Thread Mark Lawrence
On 18/05/2015 11:31, iMath wrote: 在 2015年5月14日星期四 UTC+8下午11:45:38,Steven D'Aprano写道: I'd like to do a little survey, and get a quick show of hands. How many people have written GUI or text-based applications or scripts where a Move file to trash function would be useful? Would you like to see

Re: Survey -- Move To Trash function in Python?

2015-05-18 Thread iMath
在 2015年5月14日星期四 UTC+8下午11:45:38,Steven D'Aprano写道: I'd like to do a little survey, and get a quick show of hands. How many people have written GUI or text-based applications or scripts where a Move file to trash function would be useful? Would you like to see that in the standard library,

Re: Survey -- Move To Trash function in Python?

2015-05-15 Thread sohcahtoa82
On Friday, May 15, 2015 at 11:27:18 AM UTC-7, rand...@fastmail.us wrote: On Fri, May 15, 2015, at 00:25, Chris Angelico wrote: The main thing is that trashing invites the system to delete the file at its leisure, I've never seen a system whose trash can emptied itself without user

Re: Survey -- Move To Trash function in Python?

2015-05-15 Thread random832
On Fri, May 15, 2015, at 00:25, Chris Angelico wrote: The main thing is that trashing invites the system to delete the file at its leisure, I've never seen a system whose trash can emptied itself without user intervention. -- https://mail.python.org/mailman/listinfo/python-list

Re: Survey -- Move To Trash function in Python?

2015-05-15 Thread Chris Angelico
On Sat, May 16, 2015 at 4:27 AM, random...@fastmail.us wrote: On Fri, May 15, 2015, at 00:25, Chris Angelico wrote: The main thing is that trashing invites the system to delete the file at its leisure, I've never seen a system whose trash can emptied itself without user intervention. They

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Ethan Furman
On 05/14/2015 08:45 AM, Steven D'Aprano wrote: I'd like to do a little survey, and get a quick show of hands. How many people have written GUI or text-based applications or scripts where a Move file to trash function would be useful? Never. Would you like to see that in the standard

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Dave Farrance
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I'd like to do a little survey, and get a quick show of hands. How many people have written GUI or text-based applications or scripts where a Move file to trash function would be useful? Would you like to see that in the standard

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Grant Edwards
On 2015-05-14, Dave Farrance davefarra...@omitthisyahooandthis.co.uk wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I'd like to do a little survey, and get a quick show of hands. How many people have written GUI or text-based applications or scripts where a Move file to

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Chris Warrick
On Thu, May 14, 2015 at 8:11 PM, Grant Edwards invalid@invalid.invalid wrote: On 2015-05-14, Dave Farrance davefarra...@omitthisyahooandthis.co.uk wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I'd like to do a little survey, and get a quick show of hands. How many people

Survey -- Move To Trash function in Python?

2015-05-14 Thread Steven D'Aprano
I'd like to do a little survey, and get a quick show of hands. How many people have written GUI or text-based applications or scripts where a Move file to trash function would be useful? Would you like to see that in the standard library, even if it meant that the library had feature-freeze and

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Grant Edwards
On 2015-05-14, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I'd like to do a little survey, and get a quick show of hands. How many people have written GUI or text-based applications or scripts where a Move file to trash function would be useful? How would you even define what

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Chris Angelico
On Fri, May 15, 2015 at 1:49 AM, Grant Edwards invalid@invalid.invalid wrote: On 2015-05-14, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I'd like to do a little survey, and get a quick show of hands. How many people have written GUI or text-based applications or scripts where

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Ethan Furman
On 05/14/2015 11:43 AM, Chris Warrick wrote: And if you are looking for a mostly-compliant Python library/app (and a shameless plug): https://pypi.python.org/pypi/trashman/1.5.0 The docs listed link to Package Builder. How is that related to TrashMan? -- ~Ethan~ --

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Steven D'Aprano
On Fri, 15 May 2015 01:49 am, Grant Edwards wrote: On 2015-05-14, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I'd like to do a little survey, and get a quick show of hands. How many people have written GUI or text-based applications or scripts where a Move file to trash

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Chris Angelico
On Fri, May 15, 2015 at 11:37 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 15 May 2015 01:49 am, Grant Edwards wrote: On 2015-05-14, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I'd like to do a little survey, and get a quick show of hands. How

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Steven D'Aprano
On Fri, 15 May 2015 03:32 am, Dave Farrance wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I'd like to do a little survey, and get a quick show of hands. How many people have written GUI or text-based applications or scripts where a Move file to trash function would be

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Chris Angelico
On Fri, May 15, 2015 at 2:09 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Yes, but sometimes it's at the file system's discretion - particularly when you're working with network mounts. The application may not even know that the file got hard deleted. Citation needed.

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Ian Kelly
On May 14, 2015 7:55 PM, Chris Angelico ros...@gmail.com wrote: (Though when it comes to the bikeshedding phase, I'm sure there'll be some who say if it can't be trashed, just hard delete it, and others who say if it can't be trashed, raise an exception. And neither is truly wrong.) The

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Terry Reedy
On 5/14/2015 10:03 PM, Steven D'Aprano wrote: The idea is that the library will hide that complexity from you, so your python code will just say: import shutil shutil.move_to_trash(filename) Since 'trash' is (or is used as) a verb, shutil.trash(filename) seems sufficient. and it will work

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Chris Angelico
On Fri, May 15, 2015 at 12:49 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On May 14, 2015 7:55 PM, Chris Angelico ros...@gmail.com wrote: (Though when it comes to the bikeshedding phase, I'm sure there'll be some who say if it can't be trashed, just hard delete it, and others who say if it

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Steven D'Aprano
On Fri, 15 May 2015 12:56 pm, Chris Angelico wrote: On Fri, May 15, 2015 at 12:49 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On May 14, 2015 7:55 PM, Chris Angelico ros...@gmail.com wrote: (Though when it comes to the bikeshedding phase, I'm sure there'll be some who say if it can't be

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Steven D'Aprano
On Fri, 15 May 2015 01:59 am, Chris Angelico wrote: On Fri, May 15, 2015 at 1:49 AM, Grant Edwards invalid@invalid.invalid wrote: On 2015-05-14, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I'd like to do a little survey, and get a quick show of hands. How many people have