Closed koteth closed 10 years ago
I like the enhancements, but why did you move everything out of init and main ?
hi, init.py in python is mainly a marker that qualifies a directory as a package. it's usually empty so it's the last place where I search for a block of code in a project. For this reason I prefer not to use it if is not needed.
Regarding main.py file, it is usually present if you want to run a program with 'python
init being empty is a commonly used convention, but you typically import anything you want to be globally accessible from your module into it. I can't merge this because you broke compatibility with anyone using the module like this:
import ssim
ssim.compute_ssim(...)
The main file allows you to do this:
python -m ssim
or from developemt:
python ssim
you are right, I have made some small backward compatibility enhancements in order to support the 3 scenarios you have explained. Now it should be ok.
done
Thanks for your contribution!
Hey, would you mind sending me a PR to add yourself to the AUTHORS file?
I’ve done a small refactoring for myself. I’ve also enabled the possibility to compare an image against a list (directory) of images. if you pass 2 images as input the output is the same as the old code. if you want to take my code is ok .