Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #60640 > unrolled thread
| Started by | "jm.almeras" <jm.almeras@nospam.net> |
|---|---|
| First post | 2013-11-27 22:35 +0100 |
| Last post | 2013-11-28 19:09 +0100 |
| Articles | 10 — 9 participants |
Back to article view | Back to comp.lang.python
Access database - GUI - Python - I need architectural advice "jm.almeras" <jm.almeras@nospam.net> - 2013-11-27 22:35 +0100
Re: Access database - GUI - Python - I need architectural advice Chris Angelico <rosuav@gmail.com> - 2013-11-28 10:23 +1100
Re: Access database - GUI - Python - I need architectural advice Chris Angelico <rosuav@gmail.com> - 2013-11-28 17:19 +1100
Re: Access database - GUI - Python - I need architectural advice Ben Finney <ben+python@benfinney.id.au> - 2013-11-28 17:51 +1100
Re: Access database - GUI - Python - I need architectural advice Christian Gollwitzer <auriocus@gmx.de> - 2013-11-28 22:58 +0100
Re: Access database - GUI - Python - I need architectural advice Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-11-27 20:05 -0500
Re: Access database - GUI - Python - I need architectural advice Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-28 01:32 +0000
Re: Access database - GUI - Python - I need architectural advice rusi <rustompmody@gmail.com> - 2013-11-27 20:12 -0800
Re: Access database - GUI - Python - I need architectural advice Sibylle Koczian <nulla.epistola@web.de> - 2013-11-28 17:27 +0100
Re: Access database - GUI - Python - I need architectural advice Wolfgang Keller <feliphil@gmx.net> - 2013-11-28 19:09 +0100
| From | "jm.almeras" <jm.almeras@nospam.net> |
|---|---|
| Date | 2013-11-27 22:35 +0100 |
| Subject | Access database - GUI - Python - I need architectural advice |
| Message-ID | <52966592$0$3640$426a74cc@news.free.fr> |
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 ? 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 ? Thank you for any ideas you might have... Jean-Marie PS : just to make my need clear and precise, here is a list of functionnalities that I will have in my application : register sound files with all their characteristics (duration, ...), play (including quick listening with acceleration and jumps), register love level for each sound file and different users, automatic production of music lists based on predefined structures (example of a structure : 20 min classical and quiet, 20 min children songs, 30 minutes South American music, ... extra sound files like short bird songs being inserted randomly here and there, I am thinking of a meta-language to describe such a structure) taking into account love level and how long it has not been heard, ...
[toc] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-11-28 10:23 +1100 |
| Message-ID | <mailman.3329.1385594628.18130.python-list@python.org> |
| In reply to | #60640 |
On Thu, Nov 28, 2013 at 8:35 AM, jm.almeras <jm.almeras@nospam.net> wrote:
> 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 ?
If you're working with Python, why work with Access? Use one of the
free databases (eg PostgreSQL if you want something heavy-duty, or
SQLite to avoid installing anything), use a cross-platform GUI toolkit
like Tk (tkinter), GTK, wx (wxPython), or similar, and have your
program not care whether it's on Windows, Linux, or OS/2. (Yeah, you
can support OS/2 if you feel like it!!)
There are GUI builders for several of the toolkits Python supports.
Glade works for GTK, and Google tells me about a thing called wxGlade,
which presumably is the equivalent for wx. Personally, though, I don't
use them; I create my user interfaces in code, which I find easier to
work with. Give 'em a try, but don't be too scared off; it's actually
really easy to create a good cross-platform window with a modern
toolkit. Effectively, what you say is something like:
Give me a window. Lay it out with a vertical box.
Create a scrollable widget
Put a drawing area into my scrollable widget.
Put the scrollable widget onto the window.
Put an entry field into my window.
Create a horizontal button box.
Put a button "Hello" into my button box.
Put a button "Goodbye" into my button box.
Put the button box onto the window.
That's more or less how my GTK window creation works. It reads nicely
in the source code, it looks like the window's layout. Plays well with
source control, too, which a lot of GUI builder output doesn't.
The builders are there if you want them. Try without, try with, see
what suits your hand.
ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-11-28 17:19 +1100 |
| Message-ID | <mailman.3348.1385619603.18130.python-list@python.org> |
| In reply to | #60648 |
On Thu, Nov 28, 2013 at 4:55 PM, jm.almeras <jm.almeras@nospam.net> wrote: > Thank you ChrisA > > These are good ideas. But looking precisely at widgets I will need, is one > of the GUI builders capable of offering : > > 1) the use of tabs in a form (that excludes Tkinter I believe) > 2) dimensionable and editable arrays of columns and rows like when you open > a table under Access. I'm assuming it was oversight that had this come to me privately rather than be on list, and am hoping you won't mind my response going to the list. My personal experience with GUI toolkits includes a whole lot that you'll probably never see in your life (VX-REXX, VPREXX, DrRexx, VREXX (yeah, I did a lot with REXX in the 1990s), OWL, OS/2 PM, and various others), but only a few of the modern cross-platform ones. Of the three most popular Python toolkits, I have virtually no experience with two (wx and tk), and my GTK work has mostly been in Pike rather than Python. So I can't say what tkinter is capable of, but certainly GTK will do what you want. GTK's TreeView [1] [2] is capable of what you want. It does take some effort to set it up (I dread the thought of doing it in C - it's fiddly enough in languages where the array/tuple is a first class object), but its power is immense. Don't let the "Tree" put you off - a table view is just a tree where everything is a leaf. As for tabs - if you mean a Notebook[3], that's fully supported and easy to use. Be careful what you do with them, though, it's easy to make a UI that's nigh impossible to find things in if you bury things deep enough. My favorite example of that is adjusting virtual memory settings in Windows (XP; not sure how it is in the newer ones): you go to Control Panel, System properties, Advanced tab, Performance settings button (brings up another dialog), Advanced tab, Change virtual memory button (brings up yet another dialog), and then you have all your controls. Any time you're tempted to create a tab called "Advanced", have a good long think about what else you might call it... and nesting "Advanced" inside "Advanced" is usually a recipe for confusion! [1] C docs: http://www.gtk.org/api/2.6/gtk/GtkTreeView.html [2] Pike docs: http://pike.lysator.liu.se/generated/manual/modref/ex/predef_3A_3A/GTK2/TreeView.html [3] http://www.gtk.org/api/2.6/gtk/GtkNotebook.html ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Date | 2013-11-28 17:51 +1100 |
| Message-ID | <mailman.3350.1385621492.18130.python-list@python.org> |
| In reply to | #60648 |
Chris Angelico <rosuav@gmail.com> writes: > On Thu, Nov 28, 2013 at 4:55 PM, jm.almeras <jm.almeras@nospam.net> wrote: > > These are good ideas. But looking precisely at widgets I will need, > > is one of the GUI builders capable of offering : The term “GUI builder” to me implies an interactive tool for building a GUI. I think you are referring, instead, to a GUI library. > > 1) the use of tabs in a form (that excludes Tkinter I believe) Tkinter includes the modern “ttk” widget set. You can use the Notebook widget <URL:http://www.tcl.tk/man/tcl8.5/TkCmd/ttk_notebook.htm> to get a collection of exclusive-display panels activated by tabs. > > 2) dimensionable and editable arrays of columns and rows like when > > you open a table under Access. I'm not aware of a widget in Tkinter which can do that. -- \ “Pinky, are you pondering what I'm pondering?” “Umm, I think | `\ so, Brain, but three men in a tub? Ooh, that's unsanitary!” | _o__) —_Pinky and The Brain_ | Ben Finney
[toc] | [prev] | [next] | [standalone]
| From | Christian Gollwitzer <auriocus@gmx.de> |
|---|---|
| Date | 2013-11-28 22:58 +0100 |
| Message-ID | <l78ea4$plm$1@dont-email.me> |
| In reply to | #60681 |
Am 28.11.13 07:51, schrieb Ben Finney: > Chris Angelico <rosuav@gmail.com> writes: > >> On Thu, Nov 28, 2013 at 4:55 PM, jm.almeras <jm.almeras@nospam.net> wrote: >>> 2) dimensionable and editable arrays of columns and rows like when >>> you open a table under Access. > > I'm not aware of a widget in Tkinter which can do that. There is tablelist and tktable. For tablelist, a Python wrapping exists: http://tkinter.unpythonic.net/wiki/TableListWrapper This is the right tool if you have a list with multiple columns, where you want to edit the data, like this picture: http://wiki.tcl.tk/25183 Tktable is an extension which provides a grid for entry, more like a spreadsheet and with less canned functionality. http://tkinter.unpythonic.net/wiki/TkTableWrapper Christian
[toc] | [prev] | [next] | [standalone]
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2013-11-27 20:05 -0500 |
| Message-ID | <mailman.3332.1385600709.18130.python-list@python.org> |
| In reply to | #60640 |
On Wed, 27 Nov 2013 22:35:13 +0100, "jm.almeras" <jm.almeras@nospam.net>
declaimed the following:
>Access, and more generally VB, is excellent for building the GUI (forms,
Technically, that IS all that Access is -- a form/report designer. The
"native" database engine is JET (and in pre Office 2013, one had things
called Access Data Projects -- Access forms/reports using MS SQL Server as
the database engine in place of JET). JET is a file server database (each
application is opening the database file directly) rather than a
client/server system (in which the applications send requests to the server
-- the server is the only program physically touching the database
file[s]). SQLite3 is also a file server system and is packaged with Python
(on Windows at least; other systems may assume that, like the tcl/TK
system, it is installed as part of the OS)
>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 ?
>
Not quite as friendly, and sort of a moving target: Look at Dabo [the
creators' goal was to create a Python equivalent of Visual FoxPro].
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2013-11-28 01:32 +0000 |
| Message-ID | <mailman.3334.1385602389.18130.python-list@python.org> |
| In reply to | #60640 |
On 28/11/2013 01:05, Dennis Lee Bieber wrote: > Not quite as friendly, and sort of a moving target: Look at Dabo [the > creators' goal was to create a Python equivalent of Visual FoxPro]. > At http://www.dabodev.com/ and mailing list at gmane.comp.python.dabo.users. -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | rusi <rustompmody@gmail.com> |
|---|---|
| Date | 2013-11-27 20:12 -0800 |
| Message-ID | <68294043-87a8-41f7-9713-7efb3cd74114@googlegroups.com> |
| In reply to | #60640 |
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
[toc] | [prev] | [next] | [standalone]
| From | Sibylle Koczian <nulla.epistola@web.de> |
|---|---|
| Date | 2013-11-28 17:27 +0100 |
| Message-ID | <mailman.3362.1385656084.18130.python-list@python.org> |
| In reply to | #60640 |
Am 28.11.2013 02:32, schrieb Mark Lawrence: > On 28/11/2013 01:05, Dennis Lee Bieber wrote: >> Not quite as friendly, and sort of a moving target: Look at Dabo [the >> creators' goal was to create a Python equivalent of Visual FoxPro]. >> > > At http://www.dabodev.com/ and mailing list at > gmane.comp.python.dabo.users. > And while I can't compare Access and Dabo as far as ease of use is concerned (don't use Access), I _can_ say that the mailing list certainly is very friendly and helpful. But the remark about the "moving target" is very true. Sibylle
[toc] | [prev] | [next] | [standalone]
| From | Wolfgang Keller <feliphil@gmx.net> |
|---|---|
| Date | 2013-11-28 19:09 +0100 |
| Message-ID | <20131128190929.5bb37fd93853769426ef4363@gmx.net> |
| In reply to | #60640 |
> 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 : Access is not a database, it's a data shredder. And for the GUI part; it only works on that pathologic non-operating system called Microsoft (Not Responding). Use PostgreSQL instead and one of these frameworks with Python: using PyQt (& Sqlalchemy): Qtalchemy: www.qtalchemy.org Camelot: www.python-camelot.com Pypapi: www.pypapi.org using PyGTK: Sqlkit: sqlkit.argolinux.org (also uses Sqlalchemy) Kiwi: www.async.com.br/projects/kiwi using wxPython: Gui2Py: code.google.com/p/gui2py/ Dabo: www.dabodev.com Defis: sourceforge.net/projects/defis (Russian only) GNUe: www.gnuenterprise.org Sincerely, Wolfgang
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web