simulating #include in python

2005-11-15 Thread Nick Craig-Wood
We are currently investigating whether to move the data files from our application into python for ease of maintenance. Each data item turns into a class definition with some class data. The python approach looks great, but there is one feature that we'd like to have. Currently the data files

Re: simulating #include in python

2005-11-15 Thread Peter Otten
Nick Craig-Wood wrote: I'd really like to be able to run an __import__ in the context of the file thats running the include() but I haven't figured that out. execfile()? Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: simulating #include in python

2005-11-15 Thread Nick Craig-Wood
Peter Otten [EMAIL PROTECTED] wrote: Nick Craig-Wood wrote: I'd really like to be able to run an __import__ in the context of the file thats running the include() but I haven't figured that out. execfile()? Yes thats exactly what I was looking for - thank you very much! -- Nick