From 2463c243148ca11ef24f3151c0563990490c517d Mon Sep 17 00:00:00 2001 From: mytja <52399966+mytja@users.noreply.github.com> Date: Sat, 10 Apr 2021 09:19:01 +0200 Subject: [PATCH 1/2] Migrate to Python 3 --- splitipy/stuff.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/splitipy/stuff.py b/splitipy/stuff.py index a52e99c..9765cd4 100644 --- a/splitipy/stuff.py +++ b/splitipy/stuff.py @@ -14,7 +14,7 @@ def split(sfile, splitsize): if os.path.isfile(sfile): filesize = os.stat(sfile).st_size else: - print "Hey, the file named "+sfile+" doesn't exists." + print("Hey, the file named "+sfile+" doesn't exists.") return 1 splitsize = int(splitsize) * 1024 * 1024 #converting into MBs @@ -25,7 +25,7 @@ def split(sfile, splitsize): times = int(ceil(splitsize/bsize)) parts = int(ceil(filesize/splitsize)) - print "Splitting file "+ str(sfile) + " into "+ str(parts) + " parts"; + print("Splitting file "+ str(sfile) + " into "+ str(parts) + " parts") try: i=1 block=True @@ -41,7 +41,7 @@ def split(sfile, splitsize): i+=1 finally: fcombine.close() - print "Done !!" + print("Done !!") @staticmethod @@ -49,7 +49,7 @@ def combine(jfile): if os.path.isfile(jfile+".1"): filesize = os.stat(jfile).st_size else: - print "Hey, the file named "+jfile+" doesn't exists." + print("Hey, the file named "+jfile+" doesn't exists.") return 1 bsize=1024 * 1024 From c5b1c2f87f427cab9de43400dfd4e5c20ca22c1b Mon Sep 17 00:00:00 2001 From: mytja <52399966+mytja@users.noreply.github.com> Date: Sat, 10 Apr 2021 09:21:36 +0200 Subject: [PATCH 2/2] Update __init__.py --- splitipy/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/splitipy/__init__.py b/splitipy/__init__.py index e69de29..9881d35 100644 --- a/splitipy/__init__.py +++ b/splitipy/__init__.py @@ -0,0 +1 @@ +from .stuff import Stuff