Python Forum
How to create a New line in a Text block in Blender software using Python 3.7?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create a New line in a Text block in Blender software using Python 3.7?
#1
Hi,
This question is relevant to Python 3.7 used in Blender software(C++/Python).
Blender VideoEditor's "Text Block" only accepts 1 line strings.
Using the "EnterKey" for adding another line doesn't work.
When a newline character "\n" is used instead, the additional strings automatically gets concatenated at the end of the line instead of being shown on a newline .

Example 1
  • Text Input - line1\nline2
  • Screen Output - line1\nline2

Example 2
  • Text Input - line1+"\n"+line2
  • Screen Output - line1+"\n"+line2

On checking in the terminal, Blender shows the text in an escaped format.
Terminal
  • Output Example1 - line1\\nline2
  • Output Example1 - line1+\"\\n\"+line2

Please let me know ,if there is any way to add a newline .Thanks.
(Would have posted the image,but couldn't find a place to upload)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python software prathimarao 3 752 Oct-28-2023, 09:06 AM
Last Post: Gribouillis
Question Best Python course (internet or better software) for a unknowing. If possible German. Tobias_Claren 3 1,357 Dec-29-2022, 07:42 AM
Last Post: Gribouillis
  common form of multi-line text Skaperen 3 2,411 Nov-29-2019, 01:38 PM
Last Post: ichabod801
  Software(Python) Installation. Navigate Refactor Run Tools VCS tab rgbrolly 3 2,614 Oct-19-2019, 08:09 PM
Last Post: buran
  Integration of Python with MatDeck software babicmatpy 4 4,157 Jun-30-2019, 06:34 PM
Last Post: babicmatpy
  [Software suggestion] Video player written in Python? ThePhi 2 2,582 Dec-10-2018, 07:14 PM
Last Post: ThePhi
  Blender courses on sale for only $10 Larz60+ 4 3,856 Oct-17-2017, 02:03 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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