Re: [Tutor] Help error 504

2015-08-26 Thread Peter Otten
Danny Yoo wrote: > Unit tests that depend on external dependencies can be "flaky": they > might fail for reasons that you don't anticipate. I'd recommend not > depending on an external web site like this: it puts load on someone > else, which they might not appreciate. If you have a well-defined

[Tutor] value range checker

2015-08-26 Thread Albert-Jan Roskam
Hello, I have a written a function checks the validity of values. The ranges of valid values are stored in a database table. Such a table contains three columns: category, min and max. One record of such a table specifies the range for a certain category, but a category may be spread out over

Re: [Tutor] value range checker

2015-08-26 Thread Alan Gauld
On 26/08/15 14:19, Albert-Jan Roskam wrote: I have a written a function checks the validity of values. > The ranges of valid values are stored in a database table. That's an unusual choice because: 1) using a database normally only makes sense in the case where you are already using the datab

[Tutor] How should my code handle db connections? Should my db manager module use OOP?

2015-08-26 Thread boB Stepp
My ongoing project will be centered around an SQLite db. Since almost all data needed by the program will be stored in this db, my thought is that I should create a connection to this db shortly after program startup and keep this connection open until program closure. I am assuming that opening

Re: [Tutor] How should my code handle db connections? Should my db manager module use OOP?

2015-08-26 Thread Steven D'Aprano
On Wed, Aug 26, 2015 at 07:11:42PM -0500, boB Stepp wrote: > My ongoing project will be centered around an SQLite db. Since almost > all data needed by the program will be stored in this db, my thought > is that I should create a connection to this db shortly after program > startup and keep this

Re: [Tutor] How should my code handle db connections? Should my db manager module use OOP?

2015-08-26 Thread Zachary Ware
On Aug 26, 2015 9:03 PM, "Steven D'Aprano" wrote: > - If your database lives on a NTFS partition, which is very common for > Linux/Unix users > these issues, especially on Linux when using NTFS. Surely you mean NFS, as in Network FileSystem, rather than NTFS as in New Technology FileSystem? :)

Re: [Tutor] How should my code handle db connections? Should my db manager module use OOP?

2015-08-26 Thread Martin A. Brown
Hi there, My ongoing project will be centered around an SQLite db. Not a bad way to start. There are many possible ways to access SQL DBs. I'll talk about one of my favorites, since I'm a big fan of sqlalchemy [0], which provides a broad useful toolkit for dealing with SQL DBs and an abs