Last active
August 29, 2015 14:12
-
-
Save wlhunag/77de57e96853eb512adf to your computer and use it in GitHub Desktop.
Tkinter folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import os | |
from Tkinter import * | |
def get_entry(): | |
print e1.get() | |
#按下按鈕後會建立資料夾 | |
os.mkdir(e1.get()) | |
master = Tk() | |
Label(master, text="Folder Name").grid(row=0) | |
e1 = Entry(master) | |
e1.grid(row=0, column=1) | |
Button(master, text='Get', command=get_entry).grid(row=2, column=1, sticky=E) | |
#因為原本 input text 沒有內容,所以不能用來建立資料夾 | |
#os.makedirs(e1.get()) | |
mainloop( ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment