473,397 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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

any simple method?

Aug 28 '06 #1
8 2869
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).
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Aug 28 '06 #2
So what? Java 5.0 has the method, why python has not?
Bruno Desthuilliers wrote:
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).
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Aug 28 '06 #3
"neoedmund" <ne*******@gmail.comwrote:
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>

Aug 28 '06 #4
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

Aug 28 '06 #5
Paul Boddie schrieb:
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
Aug 28 '06 #6
neoedmund a écrit :
<ot>please don't top-post (corrected)</ot>
Bruno Desthuilliers wrote:
>>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).
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.
Aug 28 '06 #7
Martin v. Löwis a écrit :
Paul Boddie schrieb:
>>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.
Regards,
Martin
Aug 28 '06 #8
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.
Aug 28 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

46
by: dawn | last post by:
Hi all, I am now working on a C program under Unix. The requirement for the program is that: A file name is passed to program as a parameter. The program will Find files under a specified...
11
by: Juan Romero | last post by:
Hey guys, I have an ImageList control that stores my icons. What I need to do is find out if the icon at hand already exists in the ImageList so I dont enter it twice. How can I do that? ...
2
by: Mamatha | last post by:
Hi I want to add an icon to the textbox's text. I don't know how to display icon in textbox in VB.NET. If any one knows please let me know. Thanks in advance. Mamatha
3
by: Peter Rilling | last post by:
When I installed VS.NET, I noticed that the solution files (having the extension .sln) seem to know what version of the ide created it. If I have previous version, the icon changes and when...
2
by: flaper87 | last post by:
Hi everybody!!!! I am developing an aplication, and i want it to stay on the system tray, i found out how to put the icon, but i can minimize it there, What do i have to do?, I'm using python(of...
0
by: adeebraza | last post by:
My Dear, Salman1karim As you have finished your first project in vb6, MS Access 2003 and crystal reports 11 and you want to create setup file. You need Pdcmdln.EXE file to create setup program of...
2
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
Hi; How can I set the icon for the DLL file a portla deploy project creates? -- thanks - dave david_at_windward_dot_net http://www.windwardreports.com Cubicle Wars -...
1
by: Ricardo | last post by:
Hello, I have just happened on a nice Borland C++ 5.5 tutorial at http://www.webnotes.org/bcc55eng.htm, meant for the very novice like myself :) I got stuck at creation of .res file needed to...
0
by: Waqas.L.Khan | last post by:
Hi guys, I have a problem when trying to create an image file. Basically my code takes any file and gets it's system icon using SHGetFileInfo and then saves the file either by converting it into...
1
by: =?Utf-8?B?U3RldmVU?= | last post by:
I have a structure that contains both 32x32 and 16x16 icons plus some text. I want to write all this to an XML file so that I can recover the icons later in an application. Can someone tell me how...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.