-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some little problems #2
base: master
Are you sure you want to change the base?
Conversation
gaunthan
commented
May 9, 2019
- The package name for 'cv2' should be 'opencv-python'
- Porting to python 3
- Allow the directory of input/output to be outside of the working directory
@mjsobrep @varunagrawal Could you please merge this pull request? |
您的来信我已收到,我会尽快回复。
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one small change: sanitize directory input.
target_directory = os.path.join(os.getcwd(), directory) | ||
directory_out = os.path.join(os.getcwd(), directory_out) | ||
print "Searching for images in: " + target_directory | ||
target_directory = directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should sanitize with expand user
for name in file_names: | ||
print "\t" + name | ||
print("\t" + name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be great to at some point change all of these to f-strings, but not critical
@aparico I'm mostly OK with this. Just need to add something to the directory to appropriately sanitize it. Have you tested the changes? |