- #1
cpscdave
- 403
- 120
In c I quite often build header files with a bunch of predefined data. Fill it with structures or what not.
Then to include that information in my program its a simple #include "myHeader.h"
Is there a way I can do this in python?
I've created another file "myHeader.py"
Have put in some code to setup these values
then in main file I put import myHeader but it doesn't appear to work as I intend.
Any suggestions??*edit* I figured I can do it by doing
from myHeader import *
SOLVED :) unless there is a more proper way to accomplish this in python :)
Then to include that information in my program its a simple #include "myHeader.h"
Is there a way I can do this in python?
I've created another file "myHeader.py"
Have put in some code to setup these values
then in main file I put import myHeader but it doesn't appear to work as I intend.
Any suggestions??*edit* I figured I can do it by doing
from myHeader import *
SOLVED :) unless there is a more proper way to accomplish this in python :)