Access database - GUI - Python - I need architectural advice

rusi rustompmody at gmail.com
Thu Nov 28 05:12:46 CET 2013


On Thursday, November 28, 2013 3:05:13 AM UTC+5:30, jm.almeras wrote:
> Hello !

> I wish to develop a database application with a lot of specific 
> functionnalities dealing with sound files.

> I have developped an Access prototype and run into a first problem : it 
> is not so easy to find code working with VBA to extract the duration of 
> a sound file. I have found many code samples, none works perfectly with 
> all sound files (variable rates, ...).

> A second problem I have is that I recently started programming with 
> Python, and gosh, the idea of coding with VBA after tasting Python is 
> like going back to black & white television after tasting color and 3D !

> Access, and more generally VB, is excellent for building the GUI (forms, 
> widgets etc.). Python is a great for coding, and it comes with high 
> quality libraries... Does anyone have any suggestions as to how I can 
> build my database app with nice Access-like GUI, and programming with 
> Python ?

Yes this is a hack. Everything you do in this area will be a hack
because the state of art is like this:

- No one builds GUI-tools like microsoft
- microsoft does not make programmer-friendly tools

One other hack you can consider is an inversion of what you were thinking:
- GUI under access
- programming under python
- bridge between the two via csv-hybrid*
- script-drive the access from the outside rather than from the inside (VBA).  
  (How to do that I'm not sure though there must be a way)

Note 1: "hybrid" because with sound files pure csv is not practicable
Note 2: The more you are using real 'databasey stuff' -- referential integrity, 
foreign keys etc -- the more this approach becomes ugly.


> One idea that has come to my mind is to store python modules in the 
> Access database and write VBA code to execute these on the fly... Is 
> this crazy ?


A less hairy way to do the same:
- Package up all the python functionality as standalone scripts
- Call these out from access

This way you dont put whole scripts inside access.
You only have to handle command-lines:
- build up inside access
- analyse inside python



More information about the Python-list mailing list