03002_刘洪义_期中作业第一次提交#8
Open
DavidYoung93 wants to merge 1 commit intoTDChina:masterfrom
Hidden character warning
The head ref may contain hidden characters: "03002\u5218\u6d2a\u4e49"
Open
Conversation
sol87
reviewed
Oct 20, 2019
| allFiles.append(filename) | ||
| return (allPath,allFiles) | ||
|
|
||
| def setNewPath(original_path,target_path):#根绝原始文件目录创建新路径下的文件夹目录 |
Contributor
There was a problem hiding this comment.
doc string 应该放在函数体内,像这样:
def setNewPath(original_path,target_path):
"""根绝原始文件目录创建新路径下的文件夹目录"""| #print(target_name) | ||
| if not os.path.exists(target_name): | ||
| os.makedirs(target_name) | ||
| def creatfolder(target_path):#根据收到的maya文件名称创建集号,镜头号等.. |
| if not os.path.exists(temp_ep_path): | ||
| #print(temp_ep_path) | ||
| os.makedirs(temp_ep_path) | ||
| for i in cam: |
| if not os.path.exists(temp_cam_path): | ||
| os.makedirs(temp_cam_path) | ||
|
|
||
| def getNum(original_path):#根据给到的maya文件名称获得集号镜头号等.. |
| cam = [] | ||
| joinpath =[] | ||
| '''allFiles = ["ep05_sc001_cam001_v001", "ep06_sc001_cam002a_v004", "ep06_sc003_cam001b_v002", "ep04_sc003_cam009H_v002", | ||
| "ep06_sc004_cam001a-v001"]''' |
| cam.append(num[0][1]+"\\"+num[0][2]) | ||
| joinpath.append(num[0][0]+"\\"+num[0][1]+"\\"+num[0][2]) | ||
| #print(num[0][0]) | ||
| return(ep,sc,cam,joinpath) |
| temp_cam_path = os.path.join(temp_ep_path,i) | ||
| if not os.path.exists(temp_cam_path): | ||
| os.makedirs(temp_cam_path) | ||
|
|
| count = 0 | ||
| Projectinformation = os.path.join(projectpath, 'Projectinformation.txt') | ||
| for root , dirs, files in os.walk(original_path): | ||
| for name in files: |
| else: | ||
| shutil.copy(base_name, target_name) | ||
| os.rename(target_name,target_final_name) | ||
| else:#如果复制文件夹内有子文件夹,则把子目录文件复制到目标路径根目录下 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
03002 刘洪义 期中作业第一次提交