<[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> hi all,
>      i have following code
>
>
>  if <condition>
>      from SIPT.xml_param_mapping import MESSAGE_PARAMETER_MAPPING
>  else:
>      from SIPT.msg_param_mapping import MESSAGE_PARAMETER_MAPPING
>
>  parameter_list = MESSAGE_PARAMETER_MAPPING ['ABC' ]
>  for parms in parameter_list:
>      parameter_list[parms][4] = 'EXPORT'
>      parameter_list[parms][5] = 'IMPORT'
>
>
>       After this the xml_param_mapping gets altered. this process is
> repeated over couple of time. But every time i need to get a fresh
> xml_param_mapping. So how to relaod the already imported module??
>

Why not work with a copy of MESSAGE_PARAMETER_MAPPING['ABC'], and keep the 
original intact?  Change:

parameter_list = MESSAGE_PARAMETER_MAPPING ['ABC' ]

to

parameter_list = MESSAGE_PARAMETER_MAPPING ['ABC' ][:]

Now no reimport is required.

-- Paul



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to