Anything similar to definition file?

Jason Orendorff jason at jorendorff.com
Thu Jan 17 00:27:57 EST 2002


> At this moment, I need to include the following header to each file:
> #record fields
> sampleID,pos_x,pos_y ...=0,1,2 .......
> 
> Does python have anything similar to a header file in C such that I
> can do,
> say, import myConfig, in each my file instead of repeating the above n
> times?

Put the common code in a file called "myConfig.py";
other files can say "from import myConfig *"
and use the variables as normal.

## Jason Orendorff    http://www.jorendorff.com/




More information about the Python-list mailing list