Create a text file in python using values from a sqlite database
I am trying to build a text file which is a combination of predefined strings and variable values which I would like to take from a pre-existing sqlite database.  The general format of each line of the text file is as such:

constraint n:  value i < value j

Where n is an integer which will increase by one every line.  Value i is the value found at row x, column y of table i and value j is that found at row x, column y of table j.  I will need to iterate over each value of these tables presently in my database.  My goal is to use nested while loops in order to iterate through each value in the tables, along the lines of:

    >>> while x < 30:
             y = 1
             while y < 30:
                  #code to populate text file goes here
                  n = n + 1
                  y = y + 1
             x = x + 1

I have some limited experience in python but am wide open to any suggestions.  Any input that anyone has would be very much appreciated.  

Thank you very much and Happy New Year!

Paul
Create a text file in python using values from a sqlite database
===

I am trying to build a text file which is a combination of predefined strings and variable values which I would like to take from a pre-existing sqlite database.  The general format of each line of the text file is as such:

constraint n:  value i < value j

Where n is an integer which will increase by one every line.  Value i is the value found at row x, column y of table i and value j is that found at row x, column y of table j.  I will need to iterate over each value of these tables presently in my database.  My goal is to use nested while loops in order to iterate through each value in the tables, along the lines of:

    >>> while x < 30:
             y = 1
             while y < 30:
                  #code to populate text file goes here
                  n = n + 1
                  y = y + 1
             x = x + 1

I have some limited experience in python but am wide open to any suggestions.  Any input that anyone has would be very much appreciated.  

Thank you very much and Happy New Year!

Paul