from pptx import Presentation
from pptx.util import Inches, Pt
import os


prs = Presentation()
blank_slide_layout = prs.slide_layouts[6]
slide = prs.slides.add_slide(blank_slide_layout)

left = top = width = height = Inches(1)
txBox = slide.shapes.add_textbox(left, top, width, height)
tf = txBox.text_frame

tf.text = "This is text inside a textbox"

p = tf.add_paragraph()
p.text = "This is a second paragraph that's bold"
p.font.bold = True

p = tf.add_paragraph()
p.text = "This is a third paragraph that's big"
p.font.size = Pt(40)

directory = "../results"
if not os.path.exists(directory):
    os.mkdir(directory)

filename = directory + os.path.sep + "AddTextbox.pptx"
prs.save(filename)

from pptx import Presentation
from pptx.util import Inches, Pt
import os


prs = Presentation()
blank_slide_layout = prs.slide_layouts[6]
slide = prs.slides.add_slide(blank_slide_layout)

left = top = width = height = Inches(1)
txBox = slide.shapes.add_textbox(left, top, width, height)
tf = txBox.text_frame

tf.text = "This is text inside a textbox"

p = tf.add_paragraph()
p.text = "This is a second paragraph that's bold"
p.font.bold = True

p = tf.add_paragraph()
p.text = "This is a third paragraph that's big"
p.font.size = Pt(40)

directory = "../results"
if not os.path.exists(directory):
    os.mkdir(directory)

filename = directory + os.path.sep + "AddTextbox.pptx"
prs.save(filename)
