python3 compatible, not python2 anymore

This commit is contained in:
Q
2020-09-22 09:10:41 +03:00
parent 38f26a3c69
commit fb31b64f45
8 changed files with 165 additions and 123 deletions

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright 2016 Ville Rantanen
#
@@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from qalbum import Qalbum
from argparse import ArgumentParser
from argparse import ArgumentParser
import os
# (c) ville.q.rantanen@gmail.com
@@ -37,6 +37,7 @@ def traverse(path,options):
traverse(os.path.join(path,p),options)
return
def setupoptions():
''' Setup options '''
usage='''Usage: %(prog)s [options] folder
@@ -62,13 +63,15 @@ folder is the root folder of the image album (defaults to current folder).'''
options=Qalbum.setupdefaultoptions(options)
return options
def execute():
''' Main execution '''
options=setupoptions()
traverse(options.startpath,options)
return
if __name__ == "__main__":
execute()