> I haven't written any code yet, but I was thinking I would like to test
> for either a windows environment (Is an X-Server running) or is this a
> strictly console (no X-server) environment and then do the appropriate
> thing for each environment. I am not sure that is any clearer, but I
> hope it is.

Hi Ken,

That makes sense.

Can you check to see if the DISPLAY environmental variable is set?  That
appears to be a fairly standard kludgy way to determine if the user is in
a graphical vs. non-graphical environment.  emacs, for example, appears to
check for DISPLAY before switching a terminal or X-Windows based UI.

Best of wishes!

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to