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+tkдÁËÒ»¸ö¼òµ¥½Å±¾£¬ÓÃÀ´ÏÔʾһЩͼƬºÍÆä˵Ã÷£¬Éè¼Æ2¸ö°´Å¥À´·Ò³¡£¿Ø¼þ²ÉÓÃpack()·½Ê½£¬Ö÷´°¿ÚûÓÐÌØ±ðÖ¸¶¨³ß´ç£¬°´Ï·ҳ°´Å¥ºóÄÜ×Ô¶¯ÒÀ¾ÝÄÚÈÝ×Ô¶¯Ëõ·Å´óС£¬ÈçÔ¤ÆÚÉèÏë¡£²»¹ý±È½ÏÆæ¹ÖµÄÊÇ,Èç¹ûÓÃÊ ......
ÕÕ×ÅÊéÉÏдµÄ£¬Ö´ÐÐʱ±¨´í£¨Python2.6£©
import wx
class InsertFrame(wx.Frame):
def __init__(self,parent,id):
wx.Frame.__init__(self,parent,id,'F ......
±¾ÎÄÕª×Ô¡¶¿É°®µÄPython¡·¡°¹âÅ̹ÊÊ¡±CDay-1 ʵÓû¯ÖÐÎÄ¡£
[img]http://t.douban.com/mpic/s3901817.jpg[/img]
CDay-1 ʵÓû¯ÖÐÎÄÖÐÎÄ´¦Àí£¬Íê³É¹¦ÄܵÄʵÓû¯
ÄãÅöµ½99%µÄÎÊÌ⣬ÆäËûÈË֮ǰÒѾÓöµ½¹ýÁË£¬Ë ......
1. os.system
Python code:
import os
import tempfile
filename1 = tempfile.mktemp (".txt")
open (filename1, "w").close ()
filename2 = filename1 + ".copy"
print fi ......
python "$cur_path/script/upgrade.py" "$@"
Äã¿´¿´upgrade.pyµÄÄÚÈݾÍÖªµÀÁË
´«¸ø upgrade µÄÃüÁîÐвÎÊý
°Ñ"$@"¸ø "$cur_path/script/upgrade.py" ´¦Àí¡£
......