From: Frank C. <fc...@pu...> - 2003-06-16 20:36:26
|
I need to convert a Python dictionary to a java.util.Hashtable. I'm doing it manually with: def DictToHashtable(dict): htReturn = java.util.Hashtable() for key in (dict.keys()): htReturn.put(key, dict[key]) return(htReturn) I'll bet there is an automatic way to do this but I haven't found it. Anyone know a better way? -Frank -- Frank Cohen, Founder, PushToTest, http://www.PushToTest.com, phone: 408 374 7426 Come to PushToTest for free open-source test automation solutions that test and monitor Web-enabled applications, especially Web Services for scalability and reliability. |