Re: replace regex in file using a dictionary

2011-04-05 Thread Yashwin Kanchan
How about creating a new string instead of replacing the original. def replace_keys(text, replacements_dict): text_list = text.split('\n') new_text = '' for line in text_list: key=line.split('=')[0] if key.strip() in replacements_dict: new_text = new_text +

Re: PyVISA

2011-04-01 Thread Yashwin Kanchan
Hi Have you installed the module after unzipping it? python setup.py install Got it from the README file in the downloaded tar. Regards Yashwin Kanchan On 1 April 2011 16:29, Manatee wrote: > I have unpacked the PyVISA files into the Python/lib/site-packages dir > and from the IDLE