Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working with existing files
#8
(Feb-10-2021, 04:59 PM)nilamo Wrote: Starting at line 22, what do you think the "continue" is doing? Why not use a "break" there?
Quote:
            for z in range(limit):
                zipper.write(f"{os.environ['appdata']}" + 
                             f"\\Microsoft\\Windows\\Templates\\" 
                             f"{sysinfo.node}[{z + 1}].png", f"{sysinfo.node}[{z + 1}].png")
                z += 1
                if z >= limit:
                    continue

I actually fixed it by removing the list append before returning the var. (the loop was irrelevant at the time, now it is :))
Reply


Messages In This Thread
Working with existing files - by Gilush - Feb-09-2021, 05:01 AM
RE: Working with existing files - by Gilush - Feb-09-2021, 06:42 AM
RE: Working with existing files - by bowlofred - Feb-09-2021, 06:48 AM
RE: Working with existing files - by Gilush - Feb-09-2021, 07:26 PM
RE: Working with existing files - by Gilush - Feb-09-2021, 11:54 AM
RE: Working with existing files - by Gilush - Feb-09-2021, 12:15 PM
RE: Working with existing files - by nilamo - Feb-10-2021, 04:59 PM
RE: Working with existing files - by Gilush - Feb-10-2021, 08:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Open files in an existing window instead of new Kostov 2 385 Apr-13-2024, 07:22 AM
Last Post: Kostov
  Add\insert header row existing csv files mg24 0 744 Oct-05-2022, 06:11 AM
Last Post: mg24
  Working with excel files arsouzaesilva 6 3,262 Sep-17-2021, 06:52 PM
Last Post: arsouzaesilva
  filecmp is not working for UTF-8 BOM encoded files sureshnagarajan 3 2,650 Feb-10-2021, 11:17 AM
Last Post: sureshnagarajan
  Unrelated new function causing existing working function to fail Nick_G 2 2,295 Jan-27-2020, 07:21 PM
Last Post: Nick_G
  working with more excel files Krszt 1 2,487 Mar-13-2019, 11:41 AM
Last Post: perfringo
  Working with files and dictionaries OmarSinno 1 2,627 Oct-30-2017, 11:02 AM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020