Some questions

T

Titi Anggono

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
 
A

Alessandro Bottoni

Titi said:
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
 
C

Cameron Laird

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

Thomas Ganss

Cameron said:
....
... 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 ?
 
M

Magnus Lycka

Thomas said:
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.
 
J

Jorgen Grahn

Titi Anggono wrote: ....

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Tkinter and gnuplot module 2
Some advice on getting into coding? 5
Few questions on SOAP 8
python and ajax 5
functions without parentheses 15
Bash scripts for web apps 1
ROUNDING??? 5
python html 4

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top