Some questions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Titi Anggono

    #1

    Some questions

    Hi all,

    I have some questions:

    1. Can we use Tkinter for web application such as Java
    ?
    2. I use gnuplot.py module for interfacing with
    gnuplot in linux. Can we make the plot result shown in
    web ? I tried using cgi, and it didn't work.

    Thanks



    _______________ _______________ _______________ _______
    Start your day with Yahoo! - make it your home page


  • Alessandro Bottoni

    #2
    Re: Some questions

    Titi Anggono wrote:[color=blue]
    > 1. Can we use Tkinter for web application such as Java?[/color]

    What do you mean? If you want to build up a GUI (something like a HTML page)
    for a web-based application, you can do it with TKinter. Your TKinter app
    can connect to a web server (or any other kind of server) using the
    standard Python networking libraries.

    If you want to make a web application (a server-side application similar to
    the ones you can create with JSP or EJB) you do not need Tkinter at all.
    Just use Python itself (see Albatross, Webware and Quixote for a few
    web-app frameworks for Python).
    [color=blue]
    > 2. I use gnuplot.py module for interfacing with
    > gnuplot in linux. Can we make the plot result shown in
    > web ? I tried using cgi, and it didn't work.[/color]

    The ability to display a image (in this case a GNUPlot plot) on a web page
    depends on the browser. Normally, you have to install a specific plug-in
    for displaying not-standard types of images on a web page, like it happens
    with Macromedia Flash.

    I do not know if exists any GNUPlot plug-in for the most common web
    browsers. Maybe you can save your plot in a format that is compatible with
    the existing viewers, like GIF, TIFF or JPEG. Have a look at GNUPlot
    documentation for this.

    HTH

    -----------------------------------
    Alessandro Bottoni

    Comment

    • Cameron Laird

      #3
      Re: Some questions

      In article <E0YMe.20135$F2 3.246376@twiste r2.libero.it>,
      Alessandro Bottoni <alessandro.bot toni@infinito.i t> wrote:[color=blue]
      >Titi Anggono wrote:[color=green]
      >> 1. Can we use Tkinter for web application such as Java?[/color]
      >
      >What do you mean? If you want to build up a GUI (something like a HTML page)
      >for a web-based application, you can do it with TKinter. Your TKinter app
      >can connect to a web server (or any other kind of server) using the
      >standard Python networking libraries.
      >
      >If you want to make a web application (a server-side application similar to
      >the ones you can create with JSP or EJB) you do not need Tkinter at all.
      >Just use Python itself (see Albatross, Webware and Quixote for a few
      >web-app frameworks for Python).[/color]

      Comment

      • Thomas Ganss

        #4
        Re: Some questions

        Cameron Laird schrieb:[color=blue]
        > In article <E0YMe.20135$F2 3.246376@twiste r2.libero.it>,
        > Alessandro Bottoni <alessandro.bot toni@infinito.i t> wrote:
        >[color=green]
        >>Titi Anggono wrote:[color=darkred]
        >>>1. Can we use Tkinter for web application such as Java?[/color][/color][/color]
        ....[color=blue]
        > ... or, if you mean, "is Python an apt language for client-side
        > Web development in the way Java is, with the market-leading
        > browsers all embedding JVMs which can interpret class definitions",
        > the answers is, "No." And also "Yes".
        >
        > Standard Python is *not* good for client-side Web work. Jython is,
        > though.[/color]
        My blind guess would have been that Tkinter was *not* the GUI of choice
        for *J*ython. A quick googling turned up only Tkinter for *JP*ython 1.1
        - am I [status relative python/jython newbie] missing here something ?


        Comment

        • Magnus Lycka

          #5
          Re: Some questions

          Thomas Ganss wrote:[color=blue]
          > My blind guess would have been that Tkinter was *not* the GUI of choice
          > for *J*ython.[/color]

          With Jython you'd probably use Swing or SWT. It's certainly less
          coding to get something working in Jython/Swing than with Java/Swing,
          but I suspect that there is a cost in runtime performance which
          might be a problem in some cases.

          Comment

          • Jorgen Grahn

            #6
            Re: Some questions

            On Thu, 18 Aug 2005 08:53:56 GMT, Alessandro Bottoni <alessandro.bot toni@infinito.i t> wrote:[color=blue]
            > Titi Anggono wrote:[/color]
            ....[color=blue][color=green]
            >> 2. I use gnuplot.py module for interfacing with
            >> gnuplot in linux. Can we make the plot result shown in
            >> web ? I tried using cgi, and it didn't work.[/color]
            >
            > The ability to display a image (in this case a GNUPlot plot) on a web page
            > depends on the browser. Normally, you have to install a specific plug-in
            > for displaying not-standard types of images on a web page, like it happens
            > with Macromedia Flash.
            >
            > I do not know if exists any GNUPlot plug-in for the most common web
            > browsers. Maybe you can save your plot in a format that is compatible with
            > the existing viewers, like GIF, TIFF or JPEG. Have a look at GNUPlot
            > documentation for this.[/color]

            There is AFAIK no specific gnuplot image format, so saving to some other
            format would have to be involved anyway. My version of Gnuplot includes
            support for PNG, jpeg, encapsulated PostScript and SVG among other things[1].
            PNG is probably the best overall choice.

            For bonus points, one could generate the format the browser says it
            prefers ...

            /Jorgen
            [1] "set terminal" at the gnuplot prompt lists them.

            --
            // Jorgen Grahn <jgrahn@ Ph'nglui mglw'nafh Cthulhu
            \X/ algonet.se> R'lyeh wgah'nagl fhtagn!

            Comment

            Working...