Re: Perl Dictionary Convert

2006-07-06 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Tom Grove wrote: > I have a server program that I am writing an interface to and it returns > data in a perl dictionary. Is there a nice way to convert this to > something useful in Python? You could write a little parser with pyparsing: source = """\ { Calendar = {

Re: Perl Dictionary Convert

2006-07-05 Thread faulkner
data.replace('=', ':').replace(';', ',') then eval in a namespace object whose __getitem__ method returns its argument unchanged. class not_str(str):# take care of that IPF.Contact def __getattr__(self, attr):return self + '.' + attr class not_dict(dict): def __getitem__(self, name):

Perl Dictionary Convert

2006-07-05 Thread Tom Grove
I have a server program that I am writing an interface to and it returns data in a perl dictionary. Is there a nice way to convert this to something useful in Python? Here is some sample data: 200 data follow { Calendar = { Access = { anyone = lr;}; Class = IPF.Appointment; Me