Python Forum
Write from URL with changing information to textfile
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Write from URL with changing information to textfile
#2
while True:
    # get the new data
    # if any
        # rename the old file name
        with open('new_file.txt', 'w') as new:
            new.write(data)
    
    time.sleep(10)
For example
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
RE: Write from URL with changing information to textfile - by wavic - Jul-12-2017, 07:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  textfile to customtkinter combobox janeik 6 1,902 Aug-31-2023, 02:50 AM
Last Post: deanhystad
  Importing python data to Textfile or CSV yanDvator 0 1,801 Aug-02-2020, 06:58 AM
Last Post: yanDvator
  Replace Line in Textfile Deadline 1 10,431 Nov-04-2019, 07:14 PM
Last Post: Larz60+
  Compare input() to textfile Trianne 4 3,564 Sep-29-2018, 02:32 PM
Last Post: gruntfutuk
  Write a for loop on list of lists without changing the shape of the main list Antonio 3 3,817 Jun-19-2018, 02:16 AM
Last Post: ichabod801
  Loop thru textfile, change 3 variables for every line herbertioz 11 9,273 Nov-10-2016, 04:56 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