Demo entry 5862511

Create Path String

   

Submitted by anonymous on Aug 07, 2016 at 22:58
Language: Python. Code size: 327 Bytes.

import string
import os

def create_path_string(root_directory, year, month, day):
    # root_directory is a string, the rest of the parameters are integers
    new_path = None

    try:
        new_path = os.path.join(root_directory, str(year), str(month), str(day))
    except:
        pass

    return new_path

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).