0
Küçük bir veritabanını yönetmek için, bir kez basıldığında, "sqlite3.exe" dosyasını açmak üzere bir simge kurmaya çalışıyorum. Ben girdi bu komut satırından ise: Sqlite3 pencere sorunsuz açıldı ama bir Tk arayüzünde komut embend eğer ben Sqlite3 penceresini görmek mümkün değilim olduğunuTkinter harici bir exe dosyasını açın
os.system("sqlite3.exe")
(belki olmadan kapanır iz?). Hem os.system hem de alt işlemlerini aynı sonuçla denedim.
Tkinter import * ithalat os'tanfrom Tkinter import *
import os
import threading
import subprocess
class Application(object):
def __init__(self, root):
super(Application, self).__init__()
self.root = root
self.main_container = Frame(self.root)#, bg="bisque")
self.main_container.pack(side=TOP, fill="both", expand='yes')
self.button_1 = Button(self.main_container, text = "Os", relief=RAISED, command = lambda: self.os_open())
self.button_1.pack()
self.button_2 = Button(self.main_container, text = "Subprocess", relief=RAISED, command = lambda: self.sub_open())
self.button_2.pack()
def os_open(self):
os.system("sqlite3.exe")
def sub_open(self):
exe = "sqlite3.exe"
process = subprocess.Popen(exe, stdout=subprocess.PIPE)
process.wait()
root = Tk()
app = Application(root)
root.mainloop()
, teşekkür ederim! Os.startfile'ı tamamen özledim! – Lornioiz
Rica ederim! ^^; – Moo