RE: Self-contained test setup and ports

>>The way I am thinking of dealing with the unknown-ports situation is to provide the current settings as a module or dict or something in python and have a pipe that you can use to do textual replacements in static files. So if you have a file foo.html with content like
>>
>><script>
>>var port = %(http_port_2)s
>>[...]
>>
>>and load the file as foo.html?pipe=config
>>
>>It will end up as
>>
>><script>
>>var port = 43525
>>[...]

I don't quite follow what' the magic to load foo.html?pipe=config, which make 
port=%(http_port_2) 

end up as 

var port = 43525.

From your description, sounds config is a python module/dict, right? The port replacement is in the runtime or staticly?

jwang

Received on Monday, 23 September 2013 14:55:19 UTC