WebBased Vector 2D Graphics
Diez B. Roggisch
deets at nospam.web.de
Fri Oct 5 07:28:37 EDT 2007
cjt22 at bath.ac.uk wrote:
> Hi there
>
> I currently have a Python program outputing to the command line,
> durations of 'completed Steps' and 'data items' in relation to time
> i.e.
>
>
> --------------jfh
> ---------kl //kl started after jfh finished
> % Ds //new data arrived at this point in time
> -------pl (1) //Details error with finsihed Step
> *kl // This step is now outputed but
> due to error with pl is cancelled (no duration)
>
> I am new to doing any web based development and don't have a clue
> where to start! I just wondered what is the best way to output this
> program to a web page graphically.
>
> I want to be able to represent these durations "-----" as rectangles
> and as the program runs the page will refresh every 10 seconds, thus
> the boxes will expand with time until they have finished. New data
> will also be represented in boxes with a different colour. I believe
> some kind of script will have to be run which constantly updates the
> html page after x seconds which then causes the web page to refresh
> with the updated data.
>
> Is there any way this web programming can be done in python. Or
> perhaps I can use soemthing such as ajax?
>
> As mentioned previously, I have never done any web based development
> so don't really know what I'm talking about when trying to understand
> how I can go from this Python program output to producing some
> graphical output on a web page.
You certainly need to get on speed with webdevelopment. Otherwise you will
fail miserably.
There are several options here:
- rendering a server-side image, deliver that embedded in a html-page
- render using html tags like DIV and the like, which allow for positioned
colored rectangles and text, in pixel coordinates
- canvas tag, to render 2D-drawing-commands
- embedded SVG
All that can be enriched with AJAX to have that fancy
realtime-update-thingy.
Diez
More information about the Python-list
mailing list