Passing string from python programs to external programs

2009-05-26 Thread lone_eagle
Hi all, On Linux, I do something like this $ program_to_execute input_file ... get some output ... I have the content of the input_file as a string inside a python program and would like to pass this string to the external program from inside the python program and get back the programs output

Inverse of dict(zip(x,y))

2009-03-04 Thread lone_eagle
Hi all, This might be trivial ... Can someone suggest a easy method to do the inverse of dict(zip(x,y)) to get two lists x and y? So, if x and y are two lists, it is easier to make a dictionary using d = dict(zip(x,y)), but if I have d of the form, d = {x1:y1, x2:y2, ...}, what is there any