Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
scripts for comics trip
#6
  • glob.glob:  a bit more than this. What it returns is a list of files with paths. So you also avoir the reconstruction of the path+file later on.
  • directory: if not os.path.isdir(directory): mkdir(directory) so you avoid the error if the directory exists, and get a real error otherwise (access rights,  name is used by a file, etc...). You don't need makedirS since the parent already exist.
Reply


Messages In This Thread
scripts for comics trip - by jacques_duflos - 05-11-2023, 08:11 PM
RE: scripts for comics trip - by Ofnuts - 05-11-2023, 09:25 PM
RE: scripts for comics trip - by jacques_duflos - 06-10-2023, 12:38 AM
RE: scripts for comics trip - by Ofnuts - 06-10-2023, 07:23 AM
RE: scripts for comics trip - by jacques_duflos - 06-10-2023, 08:27 PM
RE: scripts for comics trip - by Ofnuts - 06-10-2023, 09:13 PM

Forum Jump: