To run Python script svg-inline.py inside Scribus, in terminal type:

scribus -py svg-inline.py

The Python script svg-inline.py will:

1) create textFrame

createText( 10 , 50 , 170 , 170 , "textFrame" )

2) the content of file named svg-inline.html will be imported into textFrame with

insertHtmlText( "svg-inline.html" , "textFrame" )

3) text is colored red

text = getAllText('textFrame')

findtext = 'here is placeholder for SVG item'

index = text.find(findtext)

selectText(index,len(findtext),'textFrame')

setTextColor('Red','textFrame')

Within Scribus, anyone can click with mouse on SVG graphic, then CTRL + C to copy to clipboard, selecting text with mouse, press CTRL + V to paste into text on cursor position (or replace selected text), and you have SVG inline graphic.

My question: With Python script, how to put SVG graphic as an inline graphic within textFrame ?

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque non dignissim eros. Vestibulum lobortis nibh quis ipsum suscipit, et pellentesque ipsum consequat. Mauris eget maximus lacus. Vivamus sit amet justo vehicula mi egestas aliquet et nec lorem. Nunc massa sem, viverra at magna sit amet, viverra consectetur quam. Donec posuere mauris eu nunc mattis malesuada. Proin eu libero molestie, feugiat enim sed, facilisis orci.