cloudtools/troposphere — pull request #70 by mbrossard (2014-03-29 21:02:36+00:00)
Title: Improved cfn2py and support for AWS::CloudFormation::Init

Hi,

I improved cfn2py to the point where it can roundtrip the examples (except for the OpenStack examples). It also works with some private files that include AWS::CloudFormation::Init sections.

Though not perfect and not used every day, cfn2py was my gateway to using troposphere. I think these improvements might help the next future users to step onboard.

To test with the examples, I used the following script:
```bash
#!/bin/sh

if ! [ -d tmp ] ; then mkdir tmp ; fi

for i in examples/*.py ; do
BASE=tmp/`basename $i .py`
if python $i >$BASE.json1 2>&1 ; then
echo $i;
./scripts/cfn2py $BASE.json1 > $BASE.py ;
python $BASE.py > $BASE.json2 ;
cmp $BASE.json1 $BASE.json2
fi
done
```

Sincerely,
Mathias Brossard
PS: I haven't coded much in Python, so there is probably some room for improvement.