Hello, and request for help with 'dynamic grids'

Discussion in 'Python' started by Simon Cropper, Sep 5, 2011.

  1. Hi,

    I am a applications developer - originally from Windows using primarily
    Visual Foxpro, although I am familiar with a variety of other xbase
    derivatives. I now use Linux / Ubuntu, and have been actively teaching
    myself Python with the view to migrate most of my applications to
    sqlite-based database.

    I am looking for the ability to create dynamic grids in a window but
    can't for the life of me find how to do this.

    Here is the functionality that I desire...
    1. Have a dialog appear that allows me to select a database, e.g.
    sqlite3 database.
    2. Select table in the database and have all the records appear in a
    grid. Fields represented as column, width and order adjustable, rows
    representing records. Each cell can be edited directly.
    3. I would like to create filters on this grid based on attributes in
    the table. So if the table is a list of names, filter and show only
    those people with a particular first name. For people familiar with
    xbase languages it equivalent to browsing a table and applying a filter.
    4. Once the record is identified I would like to select the record or
    hit enter to have the data sent to the keyboard buffer or put into the
    clipboard.

    I have found most of these elements available. I can create dialogs, I
    can connect to a database, I can extract data from the tables using SQL
    but I can't find how to easily get these lists into a grid -- it appears
    to me you need to allocate list record 1 to grid row 1, list record 2 to
    grid row 2, etc and manage how many rows are displayed and 'page'
    through the table.

    Am I missing something? I presume that you could just supply a list or
    array selected using SQL from a table and just pass this data to a grid
    and have it manage all the basics like if the window is resized the
    number of rows and columns are adjusted accordingly, buffering records, etc.

    My investigations have generally found that windows/forms/data entry
    screen can be created for a specific table or view, but these are
    hard-wired during development. Is there anyway of rapidly defining the
    grid during runtime so any table can be viewed?

    --
    Cheers Simon

    Simon Cropper - Open Content Creator / Website Administrator

    Free and Open Source Software Workflow Guides
    ------------------------------------------------------------
    Introduction http://www.fossworkflowguides.com
    GIS Packages http://gis.fossworkflowguides.com
    bash / Python http://scripting.fossworkflowguides.com
    Simon Cropper, Sep 5, 2011
    #1
    1. Advertising

  2. On Mon, 5 Sep 2011 03:18 pm Simon Cropper wrote:

    > I am looking for the ability to create dynamic grids in a window but
    > can't for the life of me find how to do this.


    What GUI toolkit are you using?


    --
    Steven
    Steven D'Aprano, Sep 5, 2011
    #2
    1. Advertising

  3. On 05/09/11 17:19, Steven D'Aprano wrote:
    > On Mon, 5 Sep 2011 03:18 pm Simon Cropper wrote:
    >
    >> I am looking for the ability to create dynamic grids in a window but
    >> can't for the life of me find how to do this.

    >
    > What GUI toolkit are you using?
    >
    >


    I have looked at wxGlade, Boa Constructor, wxFormBuilder, tkinder, I
    have also looked through the Python website many times looking for
    commands that would allow me to create a GUI from scratch.

    --
    Cheers Simon

    Simon Cropper - Open Content Creator / Website Administrator

    Free and Open Source Software Workflow Guides
    ------------------------------------------------------------
    Introduction http://www.fossworkflowguides.com
    GIS Packages http://gis.fossworkflowguides.com
    bash / Python http://scripting.fossworkflowguides.com
    Simon Cropper, Sep 5, 2011
    #3
  4. Simon Cropper

    alex23 Guest

    On Sep 5, 3:18 pm, Simon Cropper <>
    wrote:
    > My investigations have generally found that windows/forms/data entry
    > screen can be created for a specific table or view, but these are
    > hard-wired during development. Is there anyway of rapidly defining the
    > grid during runtime so any table can be viewed?


    The commercial product Resolver One provides a grid/spreadsheet style
    interface with Python scripting capabilities. I'm not sure of its
    current licensing status but I believe it used to be free if used on
    open source projects.

    http://www.resolversystems.com/products/resolver-one/

    Each spreadsheet itself is Python code; I think it should be quite do-
    able to take something with introspective SQL capabilities like
    SQLAlchemy and have it title columns and fill them with the correct
    fields accordingly.

    Hope this helps.
    alex23, Sep 5, 2011
    #4
  5. On 06/09/11 00:40, alex23 wrote:
    > On Sep 5, 3:18 pm, Simon Cropper<>
    > wrote:
    >> My investigations have generally found that windows/forms/data entry
    >> screen can be created for a specific table or view, but these are
    >> hard-wired during development. Is there anyway of rapidly defining the
    >> grid during runtime so any table can be viewed?

    >
    > The commercial product Resolver One provides a grid/spreadsheet style
    > interface with Python scripting capabilities. I'm not sure of its
    > current licensing status but I believe it used to be free if used on
    > open source projects.
    >
    > http://www.resolversystems.com/products/resolver-one/
    >
    > Each spreadsheet itself is Python code; I think it should be quite do-
    > able to take something with introspective SQL capabilities like
    > SQLAlchemy and have it title columns and fill them with the correct
    > fields accordingly.
    >
    > Hope this helps.
    >
    >


    Alex,

    The Resolver Package looks good. Not exactly open source though. I
    equate it to a proprietary package that can at times be used for free by
    select groups.

    The product creates spreadsheets with python code in the background
    (instead of say VBA in Excel or Basic in Calc).

    Access to a database still needs to be hard-wired, so it does not act as
    a 'dynamic' viewer. The product works pretty much like Excel and Calc in
    this manner.

    Sheets can be shared, although the Resolver Exchange website does not
    clarify the licence under which samples are released (GPL, CC, etc), so
    it is debatable how any of this could reliably be used in creation of
    derivatives.

    From what I can glean from this page...

    http://www.resolversystems.com/opensource/

    ... Resolver will allow you to use the package if you are an open
    source project to create spreadsheets that can be redistributed. For
    people to use these sheets they need to download the viewer or purchase
    the package.

    --
    Cheers Simon

    Simon Cropper - Open Content Creator / Website Administrator

    Free and Open Source Software Workflow Guides
    ------------------------------------------------------------
    Introduction http://www.fossworkflowguides.com
    GIS Packages http://gis.fossworkflowguides.com
    bash / Python http://scripting.fossworkflowguides.com
    Simon Cropper, Sep 6, 2011
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. topmind

    Dynamic SQL handling, and edit-grids?

    topmind, May 2, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    2,254
    topmind
    May 2, 2006
  2. Carl
    Replies:
    4
    Views:
    403
    Peter Hansen
    May 21, 2004
  3. Daniel Crespo
    Replies:
    5
    Views:
    395
    Amaury
    Nov 13, 2005
  4. Replies:
    10
    Views:
    623
  5. Roy
    Replies:
    6
    Views:
    582
    Roedy Green
    Jan 7, 2008
Loading...

Share This Page