God! python is such a unkempt language tracing errors is a pain in the ass. It doesn't stop on the error it stops either on the first exemption catch or the at the program execution point.
So I found one error (completely my fault) I left out a single line [strReport = ''] and because of that it completely aborts execution when it tries to return a value that doesn't exist (it exist under all circumstances except failure to meet conditions set by rules because if it fails to meet criteria then nothing else is done in that function, so when ending the function it finds no "strReport" variable and because of that the entire script stops.
still investigating list error
Edit: Modifying, and accessing list items is fixed now. Once again python is a pain in the ass, the problem was a simple indentation mistake.
All these error I don't make in csharp for 2 reasons:
- Since CSharp uses curly braces inside functions to cordon off block statements once i close a curly brace the indentation is automatically set. In python you have to pay close attention to what you're doing at all times because there is nothing to denote start and finish of a block statement, python aficionados say this leaves the language clean, i say it leaves a mess for anyone trying to use it
- I have intellisense with CSharp to point out my errors as they are made so no errors get left behind except handling errors. With python since the language is so open (and i understand that's what makes it so powerful in most cases) there's no way the language itself will ever know if you made a mistake until it runs into it during execution, and then unless you have a exception catch right were it occurs tracing it down pretty much means stepping through every single line of your code to find it
I hate python, i really do. I hate it but i respect what its trying to do. And I continue to use it because it's a challenge, it keeps my mind exercised, but even too much exercise can mess you up. Ask any weightlifter with a prolapsed anus...
Edit 2:CFry wrote:
Using R718 and it's trimming values so you can no longer replace something like ": " (2 spaces) with ": " (single space)
This is no longer a problem when using xml. however the next version (hitting the repository in the next 15 minutes) will import your old profiles without stripping spaces