Simple code and suggestion

2016-11-30 Thread g thakuri
Dear Python friends, I have a simple question , need your suggestion the same I would want to avoid using multiple split in the below code , what options do we have before tokenising the line?, may be validate the first line any other ideas cmd = 'utility %s' % (file) out, err, exitcode = co

correct way to catch exception with Python 'with' statement

2016-11-28 Thread g thakuri
Dear Python friends, Any suggestion on how to add exception and make the below program look better , I am using Python 2.7 and Linux def create_files_append(): """ """ try: os.makedirs