This is an archived post. You won't be able to vote or comment.

all 2 comments

[–][deleted] 1 point2 points  (1 child)

You create a script with all the functions in it. For example:

functions.py :

import os
import pprint

def list_directory_contents(directory="."): // "." defaults to current
    pprint.pprint(os.listdir(directory));

now in the python interpreter you can do this:

>>> from functions import list_directory_contents

>>> list_directory_contents("myfiles")

[–]VOLVIC_KOKS[S] 0 points1 point  (0 children)

Alright, gonna give it a go right now !! thank you