Python Forum
reading directory paths from file to list
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
reading directory paths from file to list
#6
I think it has something to do with the conversion to a string?
def write_dumps(self):
        dmp = self.scan_dumps()
        i = 0
        with open('practice_gui_2.ini', 'w') as f:
            while i < len(dmp):
                s = str(dmp[i])
                f.write(f'{s}\n')
                i += 1
Thanks for the help though, Larz60+ and snippsat. I don't know. I took a break and am now getting back to it...
Reply


Messages In This Thread
RE: reading directory paths from file to list - by malonn - Oct-26-2018, 12:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Absolute paths in subprocess - file not found kittyticker 4 568 Jan-28-2024, 10:37 PM
Last Post: kittyticker
Sad problems with reading csv file. MassiJames 3 704 Nov-16-2023, 03:41 PM
Last Post: snippsat
  Navigating file directories and paths inside Jupyter Notebook Mark17 5 786 Oct-29-2023, 12:40 PM
Last Post: Mark17
  trouble reading string/module from excel as a list popular_dog 0 448 Oct-04-2023, 01:07 PM
Last Post: popular_dog
  Reading a file name fron a folder on my desktop Fiona 4 983 Aug-23-2023, 11:11 AM
Last Post: Axel_Erfurt
  Using pyinstaller with .ui GUI files - No such file or directory error diver999 3 3,525 Jun-27-2023, 01:17 PM
Last Post: diver999
  Reading data from excel file –> process it >>then write to another excel output file Jennifer_Jone 0 1,151 Mar-14-2023, 07:59 PM
Last Post: Jennifer_Jone
  Extract file only (without a directory it is in) from ZIPIP tester_V 1 1,044 Jan-23-2023, 04:56 AM
Last Post: deanhystad
  Reading a file JonWayn 3 1,133 Dec-30-2022, 10:18 AM
Last Post: ibreeden
Thumbs Up Need to compare the Excel file name with a directory text file. veeran1991 1 1,165 Dec-15-2022, 04:32 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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