Re: [問題] 外部程式問題?

看板Python作者 (放蕩過日子的大學生)時間17年前 (2008/08/13 07:57), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《john12 (放蕩過日子的大學生)》之銘言: : 以下是我寫的程式 : # -*- coding: utf-8 -*- : from Tkinter import * : import win32api : import win32con : win = Tk() : win.title(string = "視窗")#視窗 : path = "./" : frame=Frame(win, relief=RAISED, borderwidth=2, width=800, height=600)#設定視窗 : 長寬 : frame.pack(side=TOP, fill=BOTH, ipadx=5, ipady=5, expand=1) : Label(win, foreground="#ff0000", font=("", 20, "bold"), text="hello").pack() : def internet():#外部呼叫 : win32api.WinExec('C:\Program Files\Internet Explorer\IEXPLORE.EXE', : win32con.SW_SHOWMAXIMIZED) : button1 = Button(frame,font=("", 20, "bold"), text="上網", command = : internet)#按鈕 : button1.place(x=300, y=300, anchor=W, width=200, height=150) : win.mainloop() : 問題是我看按鈕設定是在frame(為視窗所設定的名稱), : 那麼我呼叫的程式是否可以跟按鈕一樣可以開出後就設定在frame裡? : 我在都卡在這個問題裡, : 去找win32api.WinExec指令都沒有可以設定在視窗中的, : 希望有人可以幫幫忙, : 謝謝! 如果是每個外部程式都可以用,那麼wxpython是不是也有這個功能? -- -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 163.26.229.167
文章代碼(AID): #18eYE0cs (Python)
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
文章代碼(AID): #18eYE0cs (Python)