def read_dir(dir_name): current_path = dir_name files = os.listdir(dir_name) for f in files: if os.path.isfile(current_path + '/' + f): remote_path = Constants.PCS_BASE_DIR + '/' + current_path + '/' + f PCS.upload_file_to_pcs(remote_path, current_path + '/' + f, True) else: read_dir(current_path + '/' + f)
# -*- coding: utf-8 -*- import PCS if __name__ == '__main__': quota_info = PCS.get_pcs_quota() print quota_info['quota'] print quota_info['used']