Tkinter, X-windows and ebay

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob Greschke

    #1

    Tkinter, X-windows and ebay

    When you post something on eBay (and other places) you can use a 'browse'
    button on a web page to send a picture file from your hard drive to them for
    inclusion in your listing. Can the same kind of thing (not the same exact
    thing, of course) be done with a Python/Tkinter program that is running on a
    remote machine (that you logged into to start the program), but that's just
    using your computer's display (with X11 on a Mac, X-whatever on Linux,
    X-Win32 on Windows, etc.)? I've got an inventory program that runs this way
    and it would be nice if users could create a text file on their machine, but
    then have the program read that file and, for example, update item
    quantities according to information in that file. Things like that.

    Thanks!

    Bob


  • James Stroud

    #2
    Re: Tkinter, X-windows and ebay

    Bob Greschke wrote:[color=blue]
    > When you post something on eBay (and other places) you can use a 'browse'
    > button on a web page to send a picture file from your hard drive to them for
    > inclusion in your listing. Can the same kind of thing (not the same exact
    > thing, of course) be done with a Python/Tkinter program that is running on a
    > remote machine (that you logged into to start the program), but that's just
    > using your computer's display (with X11 on a Mac, X-whatever on Linux,
    > X-Win32 on Windows, etc.)? I've got an inventory program that runs this way
    > and it would be nice if users could create a text file on their machine, but
    > then have the program read that file and, for example, update item
    > quantities according to information in that file. Things like that.
    >
    > Thanks!
    >
    > Bob
    >
    >[/color]

    I think xml-rpc was designed to address these kinds of issues:

    http://www.pythonware.com/products/xmlrpc/

    James

    Comment

    • Cameron Laird

      #3
      Re: Tkinter, X-windows and ebay

      In article <1tqdncP3Ps7s6X fenZ2dnUVZ_tGdn Z2d@nmt.edu>,
      Bob Greschke <bob@passcal.nm t.edu> wrote:[color=blue]
      >When you post something on eBay (and other places) you can use a 'browse'
      >button on a web page to send a picture file from your hard drive to them for
      >inclusion in your listing. Can the same kind of thing (not the same exact
      >thing, of course) be done with a Python/Tkinter program that is running on a
      >remote machine (that you logged into to start the program), but that's just
      >using your computer's display (with X11 on a Mac, X-whatever on Linux,
      >X-Win32 on Windows, etc.)? I've got an inventory program that runs this way
      >and it would be nice if users could create a text file on their machine, but
      >then have the program read that file and, for example, update item
      >quantities according to information in that file. Things like that.[/color]

      Comment

      • Adonis

        #4
        Re: Tkinter, X-windows and ebay

        Bob Greschke wrote:[color=blue]
        > When you post something on eBay (and other places) you can use a 'browse'
        > button on a web page to send a picture file from your hard drive to them for
        > inclusion in your listing. Can the same kind of thing (not the same exact
        > thing, of course) be done with a Python/Tkinter program that is running on a
        > remote machine (that you logged into to start the program), but that's just
        > using your computer's display (with X11 on a Mac, X-whatever on Linux,
        > X-Win32 on Windows, etc.)? I've got an inventory program that runs this way
        > and it would be nice if users could create a text file on their machine, but
        > then have the program read that file and, for example, update item
        > quantities according to information in that file. Things like that.
        >
        > Thanks!
        >
        > Bob
        >
        >[/color]

        This is not a full answer to your question, but an idea, just so happens
        last few days I have been playing with ssh clients (putty, ssh) X11
        Forwarding with success. Essentially the user would run their preferred
        X, ssh to the server with X11 forwarding enabled to their host address
        and they can run programs like Xterm or even Nautilus, most X programs
        and it will be forwarded to their X server over a secured connection. To
        address the users file system maybe try setting up a file server on the
        Linux system referring to the users home directory, the user then
        creates a reference to the file server, then now it may mimic a "local"
        feel but all on your Linux server. Now they can run the X app and be
        able to achieve what you want. I am in no way an expert and some of my
        ideas might not be 100% accurate, but at my university this is how we
        have it set and it works perfectly (a very mixed environment as well).

        Just an idea, hope this helps.

        Adonis

        Comment

        • Bob Greschke

          #5
          Re: Tkinter, X-windows and ebay

          Thanks for the responses, guys!

          I figured it was some kind of security/convenience roadblock.

          What I came up with was the user can just create a text file (a kind of a
          transaction log of what things were done to the copy of the database on his
          machine), then cut and paste that text into a window created on their
          machine by the main database program (using X-windows, ssh, etc.), then the
          main program can read the contents of that text field and update the main
          copy of the database.

          It should work. :)

          Bob


          Comment

          • Paul Rubin

            #6
            Re: Tkinter, X-windows and ebay

            "Bob Greschke" <bob@passcal.nm t.edu> writes:[color=blue]
            > What I came up with was the user can just create a text file (a kind
            > of a transaction log of what things were done to the copy of the
            > database on his machine), then cut and paste that text into a window
            > created on their machine by the main database program (using
            > X-windows, ssh, etc.), then the main program can read the contents
            > of that text field and update the main copy of the database.
            >
            > It should work. :)[/color]

            Yuck! Why not use an http interface instead of the remote tkinter
            interface? Then the user would interact with your app through a web
            browser, giving a familiar UI as well as giving that upload button
            (which tells the browser to upload the file).

            Comment

            • Bob Greschke

              #7
              Re: Tkinter, X-windows and ebay


              "Paul Rubin" <http://phr.cx@NOSPAM.i nvalid> wrote in message
              news:7xacczt8u4 .fsf@ruckus.bro uhaha.com...[color=blue]
              > "Bob Greschke" <bob@passcal.nm t.edu> writes:[color=green]
              >> What I came up with was the user can just create a text file (a kind
              >> of a transaction log of what things were done to the copy of the
              >> database on his machine), then cut and paste that text into a window
              >> created on their machine by the main database program (using
              >> X-windows, ssh, etc.), then the main program can read the contents
              >> of that text field and update the main copy of the database.
              >>
              >> It should work. :)[/color]
              >
              > Yuck! Why not use an http interface instead of the remote tkinter
              > interface? Then the user would interact with your app through a web
              > browser, giving a familiar UI as well as giving that upload button
              > (which tells the browser to upload the file).[/color]

              Mainly because the user may be in the middle of the Himalayas trying to
              create paperwork for equipment being shipped to Japan and Chile. The
              Internet is not always an option in our line of work. We need to have
              standalone everythings. We don't live in your real world. :)

              The two databases (the one on the user's laptop, and the one back at the
              office) don't need to be reconciled until the user gets back. We just need
              to (eventually) know which pieces of equipment were sent to Japan, and which
              went to Chile.

              Bob


              Comment

              • Cameron Laird

                #8
                Re: Tkinter, X-windows and ebay

                In article <vZKdnfz889_-T3HeRVn-tw@nmt.edu>,
                Bob Greschke <bob@passcal.nm t.edu> wrote:[color=blue]
                >
                >"Paul Rubin" <http://phr.cx@NOSPAM.i nvalid> wrote in message
                >news:7xacczt8u 4.fsf@ruckus.br ouhaha.com...[color=green]
                >> "Bob Greschke" <bob@passcal.nm t.edu> writes:[color=darkred]
                >>> What I came up with was the user can just create a text file (a kind
                >>> of a transaction log of what things were done to the copy of the
                >>> database on his machine), then cut and paste that text into a window
                >>> created on their machine by the main database program (using
                >>> X-windows, ssh, etc.), then the main program can read the contents
                >>> of that text field and update the main copy of the database.
                >>>
                >>> It should work. :)[/color]
                >>
                >> Yuck! Why not use an http interface instead of the remote tkinter
                >> interface? Then the user would interact with your app through a web
                >> browser, giving a familiar UI as well as giving that upload button
                >> (which tells the browser to upload the file).[/color]
                >
                >Mainly because the user may be in the middle of the Himalayas trying to
                >create paperwork for equipment being shipped to Japan and Chile. The
                >Internet is not always an option in our line of work. We need to have
                >standalone everythings. We don't live in your real world. :)
                >
                >The two databases (the one on the user's laptop, and the one back at the
                >office) don't need to be reconciled until the user gets back. We just need
                >to (eventually) know which pieces of equipment were sent to Japan, and which
                >went to Chile.[/color]

                Comment

                Working...