'Kivy not opening new window on button press? (Subprocess/Popen, Python)
I am trying to open a new window upon a button press with kivy. However, when I try to open the file with the separate window in it, it simply doesn't do anything, however I do know it runs the function the button calls.
Can any help with why this is happening? Thank you
# Banned Book Project (Name pending) for digitech subject, Y13
from multiprocessing import Manager
from tkinter import Grid
from kivy.app import App
from kivy.uix.gridlayout import GridLayout
from kivy.uix.button import Button
import selenium
from selenium import webdriver
import subprocess
from kivy.uix.screenmanager import Screen,ScreenManager
def bannedBooksMain(self):
from subprocess import Popen, PIPE
process = Popen(['python3', 'seearch_parameters.py'], stdout=PIPE, stderr=PIPE)
class mainApp(GridLayout):
def __init__(self, **kwargs):
super(mainApp, self).__init__(**kwargs)
self.cols = 2
btn1 = Button(text='Database (Search)')
btn1.bind(on_release=bannedBooksMain)
self.add_widget(btn1)
class MyApp(App):
def build(self):
return mainApp()
MyApp().run()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|