On Sat, Aug 15, 2015 at 06:24:12PM -0500, boB Stepp wrote: > db = sqlite3.connect("my_db.db") > > 1) This will open the db if it exists already, which is normally what > I will want. But... > > 2) My understanding is that if for whatever reason the db file is not > found, then the connect statement will create a new instance of the > db, which is what I normally would not want (Except at the time of > initial creation). [...] > If I am understanding everything so far, I think that my situation > would be appropriate for using os.path.exists(). Is this correct?
Sure, why not? If might not be an utterly bullet-proof solution, but it will do the job for now and you can always revisit it later if needed. -- Steve _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor