Re: regex help

2009-12-16 Thread Intchanter / Daniel Fackrell
tation for several built-in options, and I'm sure there are many community projects that may fit the bill if none of those happen to. Personally, I consider regular expressions of any substantial length and complexity to be bad practice as it inhibits readability and maintainability. They are a

Re: Odd json encoding erro

2009-12-15 Thread Intchanter / Daniel Fackrell
: "Johnson, S", "name_first": "Steven", "name_full": "Johnson, Steve", "name_last": "Johnson", "name_matrilineal": "", "name_middle": "David", "name_nick": "", "name_prefix": "", "name_title": "", "name_use": "Steve", "player_id": "489002", "primary_position": "1", "primary_position_txt": "P", "primary_sport_code": "", "pro_debut_date": "", "start_date": "2009-12-10T00:00:00", "status": "Active", "status_code": "A", "status_date": "2009-12-10T00:00:00", "team_abbrev": "SF", "team_code": "sfn", "team_id": "137", "team_name": "San Francisco Giants", "throws": "R", "weight": "200" }, "totalSize": "1" }}}' import json print json.loads(data) (I'm running 2.6.4 on Mac OS X) Intchanter Daniel Fackrell -- http://mail.python.org/mailman/listinfo/python-list

Re: accessing gmail

2009-12-15 Thread Intchanter / Daniel Fackrell
http://mail.google.com/support/bin/answer.py?hl=en&answer=77654 -- http://mail.python.org/mailman/listinfo/python-list

Re: Immediate Help with python program!

2009-12-09 Thread Intchanter / Daniel Fackrell
On Dec 9, 5:18 pm, Jon Clements wrote: > Someone's homework assignment is overdue/due very soon? And, I don't > believe for a second this is your code. In fact, just searching for > (the obvious Java based) function names leads me to believe you've > 'butchered' it from Java code (do you not th

Re: Parsing json where object keys are not quoted?

2009-12-09 Thread Intchanter / Daniel Fackrell
On Dec 9, 3:51 pm, Wells wrote: > Is there some way to finagle the json module to parse JSON (well, > almost JSON) where the object keys are not in quotes? I know it's not > 100% valid JSON, but I'm just curious. > > I don't have control over the data, so I can't make it fit the spec :) Hopefully

Re: Perl to Python conversion

2009-12-09 Thread Intchanter / Daniel Fackrell
to learn Python and ending up with a useful tool is secondary, I'd recommend rewriting the tool from scratch, possibly keeping the Perl source handy. If the existing tool is command-line based, you might also be able to write a short script through which you can pipe the output of the original