I can't find any examples of this in my book. And I am at the moment searching the web. But if anyone knows, how do I import a "module" (file) with my own usefull functions. Something like this didn't work:
main.py:
Code:import myModule print "Trying to call a function in the other file" myFunk()
myModule.py:
Code:def myFunk(): print "It worked"
It says that it can't find the function. Both files are in the same folder. Do I have to write some code to make it a module or something? Or is there a keyword that I have to use to make the function public or something?
What am I missing here?
ØØ


Reply With Quote