Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson22-diy1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ed29f397
authored
Mar 20, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
f756bcef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
My_GIF.py
My_GIF.py
View file @
ed29f397
from
PIL
import
Image
from
tkinter.filedialog
import
*
from
tkinter
import
Tk
from
tkinter.messagebox
import
*
w
=
Tk
()
w
.
withdraw
()
q
=
askquestion
(
"询问"
,
"是否使用批量选择?"
)
if
q
==
"yes"
:
path
=
askopenfilename
(
title
=
"选择文件"
,
filetypes
=
[(
"文件夹"
,
""
)])
else
:
path
=
askopenfilenames
(
title
=
"选择多个图片"
,
filetypes
=
[(
"图片文件"
,
".png"
,
".jpg"
,
".jpeg"
,
".bmp"
)])
print
(
path
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment