how to get the os file icon for a given content-type?

B

Bruno Desthuilliers

neoedmund wrote:
<ot>Please repeat the whole question in the message body</ot>

=>how to get the os file icon for a given content-type?
any simple method?

This is specific to your OS (and FWIW, there's nothing like a "file
icon" on the OS I'm using).
 
F

Fredrik Lundh

neoedmund said:
So what? Java 5.0 has the method, why python has not?

python's developed by volunteers, and nobody has volunteered to develop
such a function.

why not check how Java does this, and contribute the code ?

</F>
 
P

Paul Boddie

neoedmund wrote:

[File icons for a given content type]
So what? Java 5.0 has the method, why python has not?

I'd be generally surprised if whichever Java API responsible for this
managed to work it out correctly for the different free desktop
environments (KDE, GNOME, etc.), partly because things like icon naming
and organisation have only been standardised relatively recently, and
partly because the heritage of Java's cross-platform capabilities would
suggest some suboptimal solution involving icons that are totally alien
to the actual desktop environment in use (or at best some icons for
GNOME) - something which would appear to be enough of a solution for
Windows developers, for example, but which would be blatantly
inappropriate for users of those other desktop environments. Still, I'd
be interested/impressed to learn otherwise, and I guess that this
project provides the API concerned:

https://jdic.dev.java.net/

There is a package for Python which supports the different
freedesktop.org standards, but I'm not sure whether it provides exactly
the support requested:

http://freedesktop.org/wiki/Software/pyxdg

Generally, desktop integration in Python's standard library has been
restricted to things like Web browser invocation, but I'd like to
expand the desktop module to include other common desktop environment
facilities:

http://www.python.org/pypi/desktop

In short, there is probably no standard library solution for this
problem. Cross-platform frameworks like PyQt may offer access to
desktop information, but I'm not completely convinced of that. I
suppose we all just have to work a bit harder to address this need.

Paul
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

Paul said:
neoedmund wrote:

[File icons for a given content type]
So what? Java 5.0 has the method, why python has not?

I'd be generally surprised if whichever Java API responsible for this
managed to work it out correctly for the different free desktop
environments (KDE, GNOME, etc.)

Just because nobody said it so far (although it's probably obvious
to everybody): I doubt neoedmund is talking about free desktop
environments...

Regards,
Martin
 
B

Bruno Desthuilliers

neoedmund a écrit :
So what? Java 5.0 has the method, why python has not?

There are a lot of things that Java has an Python don't. And a lot of
things that Python has and Java don't.

And FWIW, I'd really like to know how the Java implementation of such a
'feature' would work on a system where there's *no* 'os file icon'
associated to a given content-type.
 
B

Bruno Desthuilliers

Martin v. Löwis a écrit :
Paul said:
neoedmund wrote:

[File icons for a given content type]

So what? Java 5.0 has the method, why python has not?

I'd be generally surprised if whichever Java API responsible for this
managed to work it out correctly for the different free desktop
environments (KDE, GNOME, etc.)


Just because nobody said it so far (although it's probably obvious
to everybody): I doubt neoedmund is talking about free desktop
environments...

Which bring us back to my first answer : this is OS-specific.
 
B

Bruno Desthuilliers

neoedmund a écrit :
So what? Java 5.0 has the method, why python has not?

Sidenote : I didn't say it was not possible in Python. Just that it's OS
(or desktop-manager) specific, so you have to check your OS (or
desktop-manager) API documentation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top