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 = {
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):
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