Python Forum
problem in replace string into file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem in replace string into file
#1
hi
i have a template model,
and i want to open a file in python and replace any line of this file to one of template Models string that s name is "THISNUMBER"

then save this replaced template to new (VCF) file

[Image: 4n9QoOV]
Reply
#2
There is a missing word open
outputFile = open(...)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Replace a text/word in docx file using Python Devan 4 2,861 Oct-17-2023, 06:03 PM
Last Post: Devan
  Need to replace a string with a file (HTML file) tester_V 1 699 Aug-30-2023, 03:42 AM
Last Post: Larz60+
  Replace string in a nested Dictianory. SpongeB0B 2 1,147 Mar-24-2023, 05:09 PM
Last Post: SpongeB0B
  Replace with upper(string) WJSwan 7 1,546 Feb-10-2023, 10:28 AM
Last Post: WJSwan
  Replace columns indexes reading a XSLX file Larry1888 2 951 Nov-18-2022, 10:16 PM
Last Post: Pedroski55
  Find and Replace numbers in String giddyhead 2 1,197 Jul-17-2022, 06:22 PM
Last Post: giddyhead
  Convert string to float problem vasik006 8 3,270 Jun-03-2022, 06:41 PM
Last Post: deanhystad
  How to do a mass replace within a CSV file? cubangt 9 5,211 May-09-2022, 06:52 PM
Last Post: snippsat
  I get an FileNotFouerror while try to open(file,"rt"). My goal is to replace str decoded 1 1,361 May-06-2022, 01:44 PM
Last Post: Larz60+
  Replace String in multiple text-files [SOLVED] AlphaInc 5 7,963 Aug-08-2021, 04:59 PM
Last Post: Axel_Erfurt

Forum Jump:

User Panel Messages

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