FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-zipstream/example.py at master · travcunn/python-zipstream · GitHub
travcunn
/
python-zipstream
Public
forked from
longaccess/python-zipstream
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-zipstream
/
example.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (17 loc) · 546 Bytes
Breadcrumbs
python-zipstream
/
example.py
Copy path
File metadata and controls
25 lines (17 loc) · 546 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import
os
import
zipstream
import
zipfile
f
=
open
(
'test.zip'
,
'wb'
)
with
zipstream
.
ZipFile
(
mode
=
'w'
,
compression
=
zipstream
.
ZIP_DEFLATED
)
as
z
:
z
.
write
(
'LICENSE'
)
z
.
write
(
'LICENSE'
,
arcname
=
'stuff/LICENSE'
)
for
root
,
directories
,
files
in
os
.
walk
(
'zipstream'
):
for
filename
in
files
:
path
=
os
.
path
.
join
(
root
,
filename
)
z
.
write
(
path
,
path
)
with
open
(
'test.zip'
,
'wb'
)
as
f
:
for
chunk
in
z
:
f
.
write
(
chunk
)
f
.
close
()
with
zipfile
.
ZipFile
(
'test.zip'
)
as
z
:
z
.
testzip
()
Back
|
FazBrowse Home
|
New Git URL