Python Forum
Keep Application running after Python script ends - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Keep Application running after Python script ends (/thread-30907.html)



Keep Application running after Python script ends - PEGylated_User - Nov-12-2020

I have a program that creates label templates in Microsoft Word and I would like the created word document to remain open after the code runs, but it keeps getting shutdown during the python cleanup. How can I exclude Word from the cleanup?

import os, os.path
import sys

class test():
    
    def start_Word():
        os.startfile('WordFile')
        test.end()

    @staticmethod
    def end():
        sys.exit

test.start_Word()