]> git.phdru.name Git - m_lib.git/blobdiff - m_lib/m_shutil.py
Fix octals (066 => 0o666) for Py3 compatibility
[m_lib.git] / m_lib / m_shutil.py
index e4595c7693024df7454331c855c457f5a62dfb74..f1034e0f65ec90f9a5f1e543276c71e380aa21d0 100755 (executable)
@@ -4,6 +4,7 @@ Shell utilities. Additional to shutil.py (standard library module).
 """
 
 
+from __future__ import print_function
 import os, string
 
 
@@ -14,14 +15,14 @@ def mkhier(path): # Python implementation of UNIX' mkdir -p /path/to/dir
       return # It's Ok to have the directory already created
 
    if os.path.exists(path):
-      raise mkhier_error, "`%s' is file" % path
+      raise mkhier_error("`%s' is file" % path)
 
    list_dirs = string.split(path, os.sep)
-   #print list_dirs
+   #print(list_dirs)
    for i in range(0, len(list_dirs)):
       new_path = string.join(list_dirs[0:i+1], os.sep)
-      if (new_path <> '') and (not os.path.exists(new_path)):
-         #print "Making", new_path
+      if (new_path != '') and (not os.path.exists(new_path)):
+         #print("Making", new_path)
          os.mkdir(new_path)