/+junk/Dataanalys

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/Dataanalys

« back to all changes in this revision

Viewing changes to awnsers_and_db_edit.py

  • Committer: Gusatv Hartvigsson
  • Date: 2011-01-31 12:21:14 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20110131122114-e6e1z0pl2eadau65
lots of changes, mostly done when I actualy ran the program, and saw the errors that I made.

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
        query = awnsht.questionAndReturn() #kallar annan fil.
91
91
        print(query)
92
92
        print("commit this query to DB?")
 
93
        dbCommitString(query)
93
94
        
 
95
def dbCommitString(query):
94
96
        q = str(input("y/n > "))
 
97
        q = q.lower() #save my life
95
98
        if(q == "n"):
96
99
                menu()
97
100
        if(q == "y"):
99
102
                conn.commit()
100
103
                menu()
101
104
        else:
102
 
                print("== no input enterd assuming yes ==")
103
 
                db.execute(query)
104
 
                conn.commit()
105
 
                menu()
 
105
                print("== Enter a valid input ==")
 
106
                dbCommitString(query)
106
107
        
107
108
 
108
109
#==================== end function setion ==================