I am writing a simple python script to run and close one flatpak application.
I am triggering gedit application using flatpak command but having a hard time to figure out how to quit the application from script itself. Since once the application launches, python scripts waits for the application to terminate and then to exit.
Code:
import os
import sys
def main():
os.system("flatpak run org.gnome.gedit/x86_64/stable")
sys.exit()
if __name__ == '__main__':
main()
In above code I tried sys.exit(), but it doesn't work as it waits for the application to terminate.