About 36,500,000 results
Open links in new tab
  1. Quickstart — python-docx 1.1.2 documentation - Read the Docs

    You can add more using the .add_run() method on the paragraph: paragraph = document . add_paragraph ( 'Lorem ipsum ' ) paragraph . add_run ( 'dolor sit amet.' This produces a paragraph that looks just like one created from a single string.

  2. How to add run in paragraph using python-docx - Stack Overflow

    May 12, 2021 · For each matching run, you can create a new run with text and style from the source into the destination Document. if re.search('yyy', p.text): for r in p.runs: po.add_run(text=r.text, style=r.style) If you're not searching for a regular expression then instead do a text search: if 'yyy' in p.text: ...

  3. Execute Python scripts - Python Tutorial

    To run a Python script from an IDE, start a project first. Once the project is created add your .py files (or create them in the IDE) and press run. Click the green triangle to start the program. Another option is to click right mouse button on your Python file and selecting run.

  4. Python-docx: Is it possible to add a new run to paragraph in a specific ...

    Oct 11, 2018 · If you want to insert the new run prior to the existing run, use run._element.addprevious(new_run_element). These two are methods on the lxml.etree._Element class which all python-docx elements subclass.

  5. How to Run Your Python Scripts and Code

    Run Python scripts from the command line or terminal in your current OS; Execute code in interactive mode using Python’s standard REPL; Use your favorite IDE or code editor to run Python scripts during development; Launch scripts and programs from your operating system’s file manager; These skills are essential for you as a Python developer.

  6. python - how to "insert run" instead of "add run" to the end of …

    Dec 15, 2019 · There is no .insert_run() method on Paragraph, and if you think about it, it probably wouldn't be enough for this job anyway because there is no guarantee each sentence ends on a run boundary. You need to do sentence parsing yourself if you want it.

  7. How to Run a Python Script - GeeksforGeeks

    Dec 21, 2023 · There are various ways to run a script in Python but before going toward the different ways to run a Python script, we first have to check whether a Python interpreter is installed on the system or not. So in Windows, open ‘cmd’ (Command Prompt) and type the following command.

  8. How to add run in paragraph using python-docx #947 - GitHub

    May 12, 2021 · for r in p. runs: # print(r) # print(master.paragraphs[-1].__dir__()) run = master. paragraphs [-1]. add_run () print (run)

  9. How to add run in paragraph using python-docx? - Python Forum

    Jun 5, 2024 · from docx import Document import re master = Document("out.docx") po = master.add_paragraph('It is: ') doc = Document("in4.docx") for p in doc.paragraphs: if re.search('yyy', p.text): for r in p.runs: master.paragraphs[-1].runs.append(r) master.save('out1.doc1')

  10. Running Python Scripts: A Comprehensive Guide - CodeRivers

    Apr 23, 2025 · Python is a versatile and widely used programming language known for its simplicity and readability. Running Python scripts is a fundamental skill for developers, data scientists, and anyone interested in automating tasks or building applications with Python. In this blog post, we will explore various ways to run Python scripts, starting from the basics and moving on to more advanced techniques.

  11. Some results have been removed