Alan Gauld wrote:
<mj...@iol.pt> wrote
Yes. My program knows. A database column stores the complete file
name (including extension), and I can be certain the applications
will be available to run the file.
You still haven't answered the question.
We have established that
a) The OS knows what program is associated with the file
b) your program knows the file name and location
But does your program - or more specifically you as the author -
know what program the OS will use to open the file?
Yes. My program knows which program to use (that will be installed).
If you do you can call it explicitly, but if you do not then you
need to find a way of getting the OS to tell you, or to leave it to
the OS.
I'm interested in nthis for the sake of generalizing (which is
better). How can I get the OS to tell me which program to use. Or
alternatively, how to tell the OS to open it - assuming that since the
os knows which program to use it will just use it (perhaps too big an
assumption ;-)
For example a txt file could be opened by any of hundreds of text
editors, depending on what the user selected, but a Photoshop file
will typically only be opened by photoshop.
HTH,
Txs,
Miguel
________________________________________________________________________________
VIVA os SEUS SONHOS com o Crédito Pessoal Capital Mais.
Peça aqui até 15.000 Euros: http://www.iol.pt/correio/rodape.php?dst=0901052
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor