Python Forum
Text File Reference and Compile
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Text File Reference and Compile
#1
Hello, I am new to python and was wondering how I would reference a text file (on the left) and compile it into the specific arrangement that you see on the right. I suppose I should mention that the text file on the left contains over 400+ lines. So the actual code would need to be flexible enough to potentially accommodate, perhaps 5 or 500+ lines. The '8888' that you see on the right would have to be a custom, done by myself so it's irrelevant and simply a place holder.

Thank you.

[Image: 9mXRiMP.png]
Reply
#2
(Aug-01-2018, 03:54 PM)rsbrock20 Wrote: Hello, I am new to python and was wondering how I would reference a text file (on the left) and compile it into the specific arrangement that you see on the right. I suppose I should mention that the text file on the left contains over 400+ lines. So the actual code would need to be flexible enough to potentially accommodate, perhaps 5 or 500+ lines. The '8888' that you see on the right would have to be a custom, done by myself so it's irrelevant and simply a place holder.

Thank you.

[Image: 9mXRiMP.png]

What do you mean by "compile it"? Are you saying that you want to take the text file, alter it and then save the changes? Or do you want to take the text file, alter it and create a new text file?
Reply
#3
I suppose creating a new file is better.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Thumbs Up Need to compare the Excel file name with a directory text file. veeran1991 1 1,133 Dec-15-2022, 04:32 PM
Last Post: Larz60+
  Modify values in XML file by data from text file (without parsing) Paqqno 2 1,696 Apr-13-2022, 06:02 AM
Last Post: Paqqno
  Converted Pipe Delimited text file to CSV file atomxkai 4 7,018 Feb-11-2022, 12:38 AM
Last Post: atomxkai
  Cloning a directory and using a .CSV file as a reference to search and replace bg25lam 2 2,149 May-31-2021, 07:00 AM
Last Post: bowlofred
  [split] How to convert the CSV text file into a txt file Pinto94 5 3,376 Dec-23-2020, 08:04 AM
Last Post: ndc85430
  Saving text file with a click: valueerror i/o operation on closed file vizier87 5 4,422 Nov-16-2020, 07:56 AM
Last Post: Gribouillis
  saving data from text file to CSV file in python having delimiter as space K11 1 2,413 Sep-11-2020, 06:28 AM
Last Post: bowlofred
  Pass by object reference when does it behave like pass by value or reference? mczarnek 2 2,569 Sep-07-2020, 08:02 AM
Last Post: perfringo
  Web Form to Python Script to Text File to zip file to web wfsteadman 1 2,149 Aug-09-2020, 02:12 PM
Last Post: snippsat
  Convert Excel file to Text file marvel_plato 6 19,755 Jul-17-2020, 01:45 PM
Last Post: marvel_plato

Forum Jump:

User Panel Messages

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