FAQ
Hi,

I am considering write an application, its core functionalities should
be implemented in a command-line application with which a user can
interact via its command line interface. This kind of command line
interface can help batch usage of the application. On the other hand,
I still want a GUI front-end which does not implement any core
functionality but only provides a rich GUI interface and communicates
with the command-line back-end.

I am asking you experts, in the terms of python, what
idea/tools/module support this kind of architecture?

Thanks in advance.

-
narke

Search Discussions

  • James Mills at Jan 8, 2009 at 6:05 am

    On Thu, Jan 8, 2009 at 3:56 PM, Steven Woody wrote:
    I am considering write an application, its core functionalities should
    be implemented in a command-line application with which a user can
    interact via its command line interface. This kind of command line
    interface can help batch usage of the application. On the other hand,
    I still want a GUI front-end which does not implement any core
    functionality but only provides a rich GUI interface and communicates
    with the command-line back-end.

    I am asking you experts, in the terms of python, what
    idea/tools/module support this kind of architecture?
    Quite simple really.

    1. Implement all your core functionality as part of a library.
    2. Implement your command-line tools that utilize this library.
    3. Implement your gui that also utilizes the same library.

    myproject/
    -setup.py

    -myproject/

    -__init__.py

    -foo.py
    -bar.py
    -gui.py

    -tools/

    -foo.py
    -bar.py
    -myproject.py (gu)

    You can also take advantage of setuptools along with distutils
    and define "entry points" for your application.

    cheers
    James

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJan 8, '09 at 5:56a
activeJan 8, '09 at 6:05a
posts2
users2
websitepython.org

2 users in discussion

Steven Woody: 1 post James Mills: 1 post

People

Translate

site design / logo © 2022 Grokbase