Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

pythonʹÓÃTkinter×öGuiÈçºÎÏÔʾÓÃforgetÒþ²ØµÄ¿Ø¼þ

´´½¨¿Ø¼þ
bt=tkinter.Button(root,text='button')
bt.place(x=5,y=5)
bt.place_forget()  #Òþ²Ø¿Ø¼þ

ÈçºÎʹÒþ²ØµÄ¿Ø¼þÔÙ´ÎÏÔʾ³öÀ´
ÔÙ´Îbt.place()£¬²»ÐÐô£¿

ÔÙ´Îbt.place() »¹Óд«Èëx=5,y=5 ²»È»²»»áÏÔʾ

ÔÙÏÔʾ¾ÍÔÙ×öÒ»´Î£º
bt=tkinter.Button(root,text='button')
bt.place(x=5,y=5)
bt.place()


¾¡Á¿²»ÒªÓÃPLACE£¬ÓÃPACK»òGRID

»¹ÓÐÆäËûµÄ·½·¨Âð


Ïà¹ØÎÊ´ð£º

Python + Tkinter ´°¿ÚËõ·ÅÎÊÌâ

ѧϰÓÃpython+tkдÁËÒ»¸ö¼òµ¥½Å±¾£¬ÓÃÀ´ÏÔʾһЩͼƬºÍÆä˵Ã÷£¬Éè¼Æ2¸ö°´Å¥À´·­Ò³¡£¿Ø¼þ²ÉÓÃpack()·½Ê½£¬Ö÷´°¿ÚûÓÐÌØ±ðÖ¸¶¨³ß´ç£¬°´Ï·­Ò³°´Å¥ºóÄÜ×Ô¶¯ÒÀ¾ÝÄÚÈÝ×Ô¶¯Ëõ·Å´óС£¬ÈçÔ¤ÆÚÉèÏë¡£²»¹ý±È½ÏÆæ¹ÖµÄÊÇ,Èç¹ûÓÃÊ ......

¿´¿´Õâ¶ÎPython´úÂëÎÊÌâ³öÔÚÄÄ

ÕÕ×ÅÊéÉÏдµÄ£¬Ö´ÐÐʱ±¨´í£¨Python2.6£©
import wx
class InsertFrame(wx.Frame):
    def __init__(self,parent,id):
        wx.Frame.__init__(self,parent,id,'F ......

PythonÖÐÎÄ´¦Àí£¬Íê³É¹¦ÄܵÄʵÓû¯

±¾ÎÄÕª×Ô¡¶¿É°®µÄPython¡·¡°¹âÅ̹ÊÊ¡±CDay-1 ʵÓû¯ÖÐÎÄ¡£
[img]http://t.douban.com/mpic/s3901817.jpg[/img]
CDay-1 ʵÓû¯ÖÐÎÄÖÐÎÄ´¦Àí£¬Íê³É¹¦ÄܵÄʵÓû¯
ÄãÅöµ½99%µÄÎÊÌ⣬ÆäËûÈË֮ǰÒѾ­Óöµ½¹ýÁË£¬Ë ......

WindowsÏÂÓÃPythonÄã»á¼¸ÖÖcopyÎļþµÄ·½·¨£¿

1. os.system
Python code:
import os
import tempfile
filename1 = tempfile.mktemp (".txt")
open (filename1, "w").close ()
filename2 = filename1 + ".copy"
print fi ......

pythonÖ´Ðнű¾´øµÄ$@²ÎÊýÊÇʲôÒâ˼£¿

python "$cur_path/script/upgrade.py" "$@"
Äã¿´¿´upgrade.pyµÄÄÚÈݾÍÖªµÀÁË

´«¸ø upgrade µÄÃüÁîÐвÎÊý

°Ñ"$@"¸ø  "$cur_path/script/upgrade.py" ´¦Àí¡£
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ