in reply to Re: How to detect X?
in thread How to detect X?
You seem to be implying that you'd maintain two versions of your application -- one which runs via Tk, and one which is a console app. This is a lot of extra work. Also, consider that X is running may not be the only appropriate time to use Tk -- Windows, for example, can run Tk apps without an X server available.Well, for one thing this won't run under Windows in any case. So that's not a problem. Said this, if you read 432975 more carefully you'll notice that I wrote "[...] in that case I would put most of the non-UI code into a module and call it from the respective '.X' and '.cmd' versions.", which is fundamentally what you suggest yourself.There are two problems here -- detecting whether to use a GUI, and creating an application that is dual-mode.
Taking into account both this circumstance and the fact that after all it will be a relatively simple application, it most certainly won't be "a lot of extra work".
The only problem here is detecting X and running a GUI version if it is available or a CLI version otherwise, which doesn't seem to be a choice everybody agrees on, but that's another matter...
In any case thank you for the feedback!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to detect X?
by legato (Monk) on Feb 22, 2005 at 17:54 UTC |