当前位置: 首页>>代码示例>>Python>>正文


Python Tk.wm_attributes方法代码示例

本文整理汇总了Python中Tkinter.Tk.wm_attributes方法的典型用法代码示例。如果您正苦于以下问题:Python Tk.wm_attributes方法的具体用法?Python Tk.wm_attributes怎么用?Python Tk.wm_attributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tkinter.Tk的用法示例。


在下文中一共展示了Tk.wm_attributes方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import wm_attributes [as 别名]
def main():
    root = Tk()

    if platform.system()!="Darwin":
        MyHwCtrl = Hardware_control()
        MyHwCtrl.go_to_base()

    root.geometry("480x320")
    root.wm_title('Medimi')
    if len(sys.argv) > 1 and sys.argv[1] == 'fs':
        root.wm_attributes('-fullscreen', True)
    os = platform.system()
    print os

    if platform.system()!="Darwin":
        app = PiMenu(root, MyHwCtrl)
    else:
        print "Runnning on Mac"
        app = PiMenu(root,None)

#    myClock = Clock(root)

#   root.bind("<Button-1>", callback, root) #
#    myClock.tick()

    root.mainloop()
开发者ID:senspix,项目名称:medimi,代码行数:28,代码来源:pimenu.py

示例2: main

# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import wm_attributes [as 别名]
def main():
    global fingerprint
    root = Tk()
    root.geometry("240x320")
    root.wm_title('Marauders Map')

    if len(sys.argv) > 1 and sys.argv[1] == 'fs':
        root.wm_attributes('- fullscreen', True)
    app = Marauders(root)


    channel_hop.start_mon_mode('wlan0')

    # Start channel hopping
    iface = channel_hop.get_mon_iface()
    #iface = 'wlan2'
    hop = threading.Thread(target=channel_hop.channel_hop, args=[iface])
    hop.daemon = True
    hop.start()
    

    os.system("sudo hciconfig hci0 reset")
    #p = Popen(["hciconfig", "hci0", "down"], stdout=PIPE, stderr=PIPE, preexec_fn=os.setsid)
    #p = Popen(["hciconfig", "hci0","up"], stdout=PIPE, stderr=PIPE, preexec_fn=os.setsid)

    #p = Popen([app.path+"/ibeacon_scan","-b"], stdout=PIPE, preexec_fn=os.setsid)


    if(os.path.isfile(app.path + '/fingerprint.pkl')):
        fingerprint_file = open(app.path + '/fingerprint.pkl', 'rb')
        fingerprint = pickle.load(fingerprint_file)
        fingerprint_file.close()

    root.mainloop()
开发者ID:kmackenzieii,项目名称:marauders-map,代码行数:36,代码来源:Marauders.py

示例3: main

# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import wm_attributes [as 别名]
def main():
    root = Tk()
    root.geometry("320x240")
    root.wm_title('PiMenu')
    if len(sys.argv) > 1 and sys.argv[1] == 'fs':
        root.wm_attributes('-fullscreen', True)
    app = PiMenu(root)
    root.mainloop()
开发者ID:dmpop,项目名称:pimenu,代码行数:10,代码来源:pimenu.py

示例4: run_text_editor

# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import wm_attributes [as 别名]
def run_text_editor(filename):
    root = Tk()
    input_handler = user_input.user_input()

    input_handler.start_instance(filename)
    app = text_canvas.text_canvas(root, 12, input_handler, filename)

    root.wm_attributes('-fullscreen', 1)
    root.title('shim')
    root.overrideredirect()

    root.mainloop()
开发者ID:samos123,项目名称:shim,代码行数:14,代码来源:shim.py

示例5: __init__

# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import wm_attributes [as 别名]
    def __init__(self, exactsol, sol, speed=5):
        root = Tk()                            
        root.title("Object Interception")          
        root.wm_attributes("-topmost", 1)
        cv = Canvas(root,width=600,height=460) 
        cv.pack()
        tmp1,l,tmp2,x_int=sol
        fnt = ("Arial", 12, "bold")
        tmp1,xexact=exactsol

        attrFrame = Frame(root)
        self.bullet_coor_Lbl= Label( attrFrame, width = 20, padx=20, text = " bullet position:\n (%8.4f,%8.4f)" % (x_int,-l), anchor=CENTER,font = fnt, height = 2)
        self.proj_coor_Lbl=Label(attrFrame, width = 20, padx=20, text = " projectile position:\n (%8.4f,%8.4f)" %(0.0,0.0), anchor=CENTER, font = fnt, height = 2 )
        self.time_Lbl=Label(attrFrame, width = 20, padx=20, text = " Time:\n %6.4f" %(0.0), anchor=CENTER, font = fnt, height = 2 )
        self.error_Lbl=Label(attrFrame, width=20, padx=20, text= "Error:\n{0:6.2%}".format(0.0) ,font=fnt, anchor=CENTER,height=2)
        for widget in (self.bullet_coor_Lbl, self.proj_coor_Lbl,self.time_Lbl,self.error_Lbl):
            widget.pack(side=LEFT)
        attrFrame.pack(side=TOP)

        ctrlFrame = Frame(root) # contains Buttons to control the game 
        self.quitBtn = Button( ctrlFrame, width=11, text="OK", font=fnt,
                                state = NORMAL, padx=15, command = ctrlFrame.quit )
        self.quitBtn.pack(side=LEFT)

        ctrlFrame.pack(side=TOP)

       
        # setup of the scene
        x_axis= cv.create_line(  0,  400,  880, 400, fill='black')
        
        

        self.dEngine = DrawEngine(cv,speed, exactsol, sol,self.display_bullet_coor,self.display_proj_coor, self.display_time,self.display_error)
        
        root.mainloop()
        root.destroy()        
开发者ID:lucasp0927,项目名称:python_numerical_project,代码行数:38,代码来源:tk_animation.py


注:本文中的Tkinter.Tk.wm_attributes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。