X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_lib%2Fm_shutil.py;h=7546b0d3c17cf61cae3e185ce45743c1366b6e2c;hb=87ed070d1b1776366d3ddd15eef1f37a45c585ea;hp=10e5ebf552e4eaaf25f1fc2fe59b9ffd0e498704;hpb=d7c459a9f979c4978cf07ff11056512a852fd61d;p=m_lib.git diff --git a/m_lib/m_shutil.py b/m_lib/m_shutil.py index 10e5ebf..7546b0d 100755 --- a/m_lib/m_shutil.py +++ b/m_lib/m_shutil.py @@ -1,10 +1,10 @@ #! /usr/bin/env python -"""Broytman's shell utilities. Additional to shutil.py (standard library module) - - Written by Broytman, Oct 1997. Copyright (C) 1997 PhiloSoft Design. +""" +Shell utilities. Additional to shutil.py (standard library module). """ +from __future__ import print_function import os, string @@ -18,11 +18,11 @@ def mkhier(path): # Python implementation of UNIX' mkdir -p /path/to/dir 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)