Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
change filedialog to tkFileDialog
  • Loading branch information
bit4woo committed Jan 17, 2018
1 parent 9a4c3c9 commit d40e645
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions GUI.py
Expand Up @@ -6,7 +6,7 @@
from Tkinter import *
from lib.common import logger,strip_list
from lib.paras import paras
from tkinter import filedialog
import tkFileDialog
import passmaker
import os

Expand Down Expand Up @@ -78,7 +78,7 @@ def editseed():
self.logger.error(e)

def chosefile():
filename = filedialog.askopenfilename(filetypes=[('txt', '*.txt')])
filename = tkFileDialog.askopenfilename(filetypes=[('txt', '*.txt')])
try:
tmplist = open(filename, "r").readlines()
tmplist = strip_list(tmplist)
Expand Down Expand Up @@ -250,7 +250,7 @@ def editLeetRule():
self.logger.error(e)

def chosefile():
filename = filedialog.askopenfilename(filetypes=[('txt', '*.txt')])
filename = tkFileDialog.askopenfilename(filetypes=[('txt', '*.txt')])
try:
tmplist = open(filename, "r").readlines()
tmplist = strip_list(tmplist)
Expand Down Expand Up @@ -307,7 +307,7 @@ def delfile():
self.logger.error(e)

def chosefile():
filename = filedialog.askopenfilename(filetypes=[('txt', '*.txt')])
filename = tkFileDialog.askopenfilename(filetypes=[('txt', '*.txt')])
try:
if filename not in paras.additional_list:
paras.additional_list.append(filename)
Expand Down Expand Up @@ -412,7 +412,7 @@ def show_password(filename):
listb.insert(0, item)

def savetofile():
name = filedialog.asksaveasfile(mode='w', defaultextension=".txt")
name = tkFileDialog.asksaveasfile(mode='w', defaultextension=".txt")
try:
name.writelines(self.result)
except:
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
@@ -1,2 +1,3 @@
pyreadline
argcomplete
argcomplete
colorama

0 comments on commit d40e645

Please sign in to comment.