[Python] Importing a module
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?
ØØ
Re: [Python] Importing a module
Ohhhh...I got it...I have to add the modulename in front of it...that sucks...well, at least it is working though...
ØØ