Basically what I want to be able to do is have access to functions in another program by importing it. Is this possible? Does this only work with code written in a format that changes them from a program to an actual module. So it would not work to just import a previously written program that happens to have functions in it?

and this doesn't seem to get called.... oh its ok I realised that the colormode(255) is outside my functions.

As an afterthought rather than declaring this colormode(255) in both my functions is there a better way to do it? Should I be using a class maybe? So I can share my program elements that are shared with each function such as this colormode(255) example