On Saturday, 13 July 2013 18:11:18 UTC+10, Steven D'Aprano wrote: > On Fri, 12 Jul 2013 23:43:55 -0700, peter wrote: > > > > I am new to Python and wondering if there is a better python way to do > > A Python bash script? What does that mean? Python and bash are two > different languages.
Sorry I was trying to give some context, my mistake I am glad it did not confuse the intent of my question and you were able to provide some really helpful suggestions below. > > > My attempt is located here - https://gist.github.com/pjfoley/5989653 > > A word of advice: don't assume that just because people are reading your > > posts, that they necessarily will follow links to view your code. There > > could be all sorts of reasons why they might not: > > * SNIP Justification * > > Or some other reason. For best results, you should try to simplify the > > problem as much as possible, bringing it down to the most trivial, easy > > example you can, small enough to include directly in the body of your > > email. That might be one line, or twenty lines. > In my defence I was trying to give some context for my problem domain. The bottom of the original post (which you provided some suggestions on) had the simplified question. I find that people are more likely to help if they don't think its just a *homework question* and that someone is genuinely trying to learn. As I mentioned in the very first line of my email I am just starting to learn Python and was not even sure what I was supposed to be looking for. Obviously I found the hammer straight away *BINGO*! However in my defence when I was searching I did not have the necessary knowledge to even start looking in the right place. For reference I started searching for slice's, splitting and separating. I will look into the techniques and keywords you suggested and try your various suggestions. Thanks for your pointers. Peter -- http://mail.python.org/mailman/listinfo/python-list