FAQ
I want to write a client app in Python using wxWindows that connects to
my FreeBSD server via SSH (using my machine account credentials) and
runs a python or shell script when requested (by clicking a button for
instance).

Can someone give me some advice on how to create a "graphical shell"
per se?

Search Discussions

  • Jp Calderone at Aug 16, 2005 at 3:57 pm

    On 16 Aug 2005 07:10:25 -0700, "John F." wrote:
    I want to write a client app in Python using wxWindows that connects to
    my FreeBSD server via SSH (using my machine account credentials) and
    runs a python or shell script when requested (by clicking a button for
    instance).

    Can someone give me some advice on how to create a "graphical shell"
    per se?
    tkconch might be interesting to look at. http://www.twistedmatrix.com/projects/conch/
  • Alessandro Bottoni at Aug 17, 2005 at 7:48 am

    John F. wrote:

    I want to write a client app in Python using wxWindows that connects to
    my FreeBSD server via SSH (using my machine account credentials) and
    runs a python or shell script when requested (by clicking a button for
    instance).

    Can someone give me some advice on how to create a "graphical shell"
    per se?
    Well, a "graphical shell" is just a wxWidgets application that exposes a few
    widgets (buttons, list, whatever). Each widget has a "event" associated to
    it and this event can trigger whatever command, even a remote command on
    your FreeBSD server (via ssh). As a consequence:
    - create your user interface (I suggest you to use wxPython and wxGlade for
    this)
    - associate to each and every widget a "event handler"
    - make your event handlers call your scripts on your FreeBSD machine via SSH
    (use PySSH or Conch for this)

    Python has a couple of good implementation of SSH:
    http://pyssh.sourceforge.net/
    http://twistedmatrix.com/projects/conch/
    Both of them are well documented.

    You can find a small example here:
    http://www.palovick.com/code/python/python-ssh-client.php

    Do not use wxWidgets directly. You would have to re-create a lot of
    Python-wxWidgets integration that already exists. Use wxPython instead
    (www.wxpython.org). There is a quite good GUI builder for wxPython that is
    called wxGlade. It can generate XML files that are easier to maintain than
    C o Python code.

    CU
    -----------------------------------
    Alessandro Bottoni

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedAug 16, '05 at 2:10p
activeAug 17, '05 at 7:48a
posts3
users3
websitepython.org

People

Translate

site design / logo © 2023 Grokbase