By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,934 Members | 1,366 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,934 IT Pros & Developers. It's quick & easy.

Some questions

P: n/a
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
http://www.yahoo.com/r/hs

Aug 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Titi Anggono wrote:
1. Can we use Tkinter for web application such as Java?
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).
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.


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
Aug 18 '05 #2

P: n/a
In article <E0********************@twister2.libero.it>,
Alessandro Bottoni <al****************@infinito.it> wrote:
Titi Anggono wrote:
1. Can we use Tkinter for web application such as Java?


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).

Aug 18 '05 #3

P: n/a
Cameron Laird schrieb:
In article <E0********************@twister2.libero.it>,
Alessandro Bottoni <al****************@infinito.it> wrote:
Titi Anggono wrote:
1. Can we use Tkinter for web application such as Java?
.... ... 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.

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 ?
Aug 18 '05 #4

P: n/a
Thomas Ganss wrote:
My blind guess would have been that Tkinter was *not* the GUI of choice
for *J*ython.


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.
Aug 19 '05 #5

P: n/a
On Thu, 18 Aug 2005 08:53:56 GMT, Alessandro Bottoni <al****************@infinito.it> wrote:
Titi Anggono wrote:

....
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.


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.


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!
Aug 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.