Re: [Rest2web-develop] Re: Enhancement suggestion to rest2web
Brought to you by:
mjfoord
From: V. <gae...@no...> - 2006-04-10 07:34:32
|
On Mon, Apr 10, 2006 at 12:03:26AM +0100, Michael Foord wrote: > > I'll write a function to copy file from the source tree to the > >target tree that can be included in functions.py . I'll just wait unti= l > >tomorrow in order to have a clearer idea of what options/features migh= t > >be wanted for such function. > > Suggestions welcomed. > Ok. The file keyword isn't actually one I use (currently), I guess bein= g=20 > able to specify a list of source files and a single target directory=20 > (relative to the current target directory I guess). OK, now that I am using Processor.target in my embedded scripts I can do what I want. But it would be nicer to have a function for do this. Something like : def add_file(source, targetdir=3Dos.path.dirname(Processor.target+"/"+pag= epath) Where source could be either a string or a tuple of strings. Trying to implement this I realize I do not know how to access pagepath or Processor in functions.py . Maybe it would be nice if the namespace accessible to the embedded functions was also accessible in functions.py (note that I have no clue how to code this). On a side note: it might be a good idea to have a config entry in the config file to add a user file where he could define his functions without modifying functions.py . For large project it could prove usefull. Regards, Ga=EBl |