Skip to main content
added 170 characters in body
Source Link
mike rodent
  • 1.2k
  • 3
  • 13
  • 26

Python scripts should not be shunned as unclean:

#!/usr/bin/python3

import shutil
path_for_deletion = input( 'path of dir for deletion> ' ) 
print( 'about to remove ' + path_for_deletion + ' ...' )
shutil.rmtree( path_for_deletion, ignore_errors=True )
print( '... done' )

I've asked the guy who has done some useful benchmarking of various methods here if he could try benchmarking this. From my experiments it seems pretty good.

NB errors could be handled to at least print them out... but it might be simpler to run trash myDirectoryForDeletion or rm -rfv myDirectoryForDeletion afterwards.

Python scripts should not be shunned as unclean:

#!/usr/bin/python3

import shutil
path_for_deletion = input( 'path of dir for deletion> ' ) 
print( 'about to remove ' + path_for_deletion + ' ...' )
shutil.rmtree( path_for_deletion, ignore_errors=True )
print( '... done' )

I've asked the guy who has done some useful benchmarking of various methods here if he could try benchmarking this. From my experiments it seems pretty good.

Python scripts should not be shunned as unclean:

#!/usr/bin/python3

import shutil
path_for_deletion = input( 'path of dir for deletion> ' ) 
print( 'about to remove ' + path_for_deletion + ' ...' )
shutil.rmtree( path_for_deletion, ignore_errors=True )
print( '... done' )

I've asked the guy who has done some useful benchmarking of various methods here if he could try benchmarking this. From my experiments it seems pretty good.

NB errors could be handled to at least print them out... but it might be simpler to run trash myDirectoryForDeletion or rm -rfv myDirectoryForDeletion afterwards.

Source Link
mike rodent
  • 1.2k
  • 3
  • 13
  • 26

Python scripts should not be shunned as unclean:

#!/usr/bin/python3

import shutil
path_for_deletion = input( 'path of dir for deletion> ' ) 
print( 'about to remove ' + path_for_deletion + ' ...' )
shutil.rmtree( path_for_deletion, ignore_errors=True )
print( '... done' )

I've asked the guy who has done some useful benchmarking of various methods here if he could try benchmarking this. From my experiments it seems pretty good.