Python Forum
How best to format text in a simple text file?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How best to format text in a simple text file?
#3
Hello,

I don't get the point here... If you write the text file yourself, you have all the control of adding blank lines, spaces, tabs etc. Sure, you have to take care of that yourself, as there is no module with automagically guesses what you want to file to look like and formats it like this.

I we recommend to put the text into a list of strings with the intented formatting and than write as a text file to the hard drive.

Regards, noisefloor
Reply


Messages In This Thread
RE: How best to format text in a simple text file? - by noisefloor - Jun-14-2019, 06:07 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  subprocess check_output text cut off Axel_Erfurt 5 817 Feb-20-2025, 02:15 PM
Last Post: DeaD_EyE
  How can I write formatted (i.e. bold, italic, change font size, etc.) text to a file? JohnJSal 12 28,180 Feb-13-2025, 04:48 AM
Last Post: tomhansky
  Python - Hidden Text / Html Mail python1337 1 2,972 Feb-08-2025, 10:47 AM
Last Post: python1337
  Problems writing a large text file in python Vilius 4 1,048 Dec-21-2024, 09:20 AM
Last Post: Pedroski55
  Get an FFMpeg pass to subprocess.PIPE to treat list as text file? haihal 2 1,068 Nov-21-2024, 11:48 PM
Last Post: haihal
  parsing a tree of text first the right most aligned blocks of text and so on arvindikchari 2 814 Nov-21-2024, 01:42 AM
Last Post: BashBedlam
  Paste text with caret already positioned inside a placeholder; Wehaveall 1 845 Oct-15-2024, 10:28 AM
Last Post: menator01
Photo image generation with text style Belialhun 0 663 Oct-08-2024, 01:53 PM
Last Post: Belialhun
  How to insert text time - into video frames? oxidian 0 1,248 Aug-25-2024, 04:51 PM
Last Post: oxidian
  Print text with big font and style tomtom 6 20,755 Aug-13-2024, 07:26 AM
Last Post: yazistilleriio

Forum Jump:

User Panel Messages

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