[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] placing a running program's output on a surface



Brad Montgomery wrote:
Does anyone know if there is a way to get the output of a linux
program onto a surface? For example, having Firefox run on a square
that you could move around because it is a pygame surface?


Well... anything's possible, right (Fred Brooks says programmers are
optimists...)

Since you're asking about linux, I suppose you "could" lauch the app
from the command line and redirect any standard output to a text file,
whose contents you could periodically read into a string, which could
then be dumped onto a surface.

You "might" also be able to launch your linux program from within your
pythong script using popen and capture any output from that into a
string...

Of course... depending on what you want to do, your mileage may vary.


Sure, it all comes down to inventing a new GUI to run on top of an existing GUI/windowing system. Think Smalltalk. A console on a modern graphics based operating system is just a text widget in a window.

--
Lenard Lindstrom
<len-l@xxxxxxxxx>