Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
encryption_script
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
97b2d3ed
authored
2022-09-09 14:14:44 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Update py2so.py
1 parent
ae1b0bc8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
py2so.py
py2so.py
View file @
97b2d3e
...
...
@@ -59,14 +59,16 @@ def copy_other_files(input_path, exclude_paths, output_path):
return
for
parent
,
_
,
filenames
in
os
.
walk
(
input_path
):
if
parent
in
exclude_paths
:
relpath
=
os
.
path
.
relpath
(
parent
,
input_path
)
target_dir
=
os
.
path
.
join
(
output_path
,
relpath
)
shutil
.
copytree
(
parent
,
target_dir
)
print
(
'copy {0} to {1}'
.
format
(
parent
,
target_dir
))
#
relpath = os.path.relpath(parent, input_path)
#
target_dir = os.path.join(output_path, relpath)
#
shutil.copytree(parent, target_dir)
#
print('copy {0} to {1}'.format(parent, target_dir))
continue
for
filename
in
filenames
:
file_path
=
os
.
path
.
join
(
parent
,
filename
)
if
file_path
in
exclude_paths
or
not
is_about_py
(
filename
):
if
file_path
in
exclude_paths
:
continue
elif
not
is_about_py
(
filename
):
relpath
=
os
.
path
.
relpath
(
file_path
,
input_path
)
target_path
=
os
.
path
.
join
(
output_path
,
relpath
)
os
.
makedirs
(
os
.
path
.
dirname
(
target_path
),
exist_ok
=
True
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment