473,803 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

any simple method?

Aug 28 '06 #1
8 2890
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*******@gmai l.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
environment s (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
2544
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 directory. The matched file must have the same content with the given file. It does not matter whether the filenames are the same. It is easy to find file that has the same name with given file, but may be hard to find the files that with the same...
11
3924
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? Thanks in advance!
2
19877
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
1336
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 double-clicked, it seems to know which IDE to launch. Anyone know how this is done?
2
5378
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 course). and this is the code: # -*- coding: iso-8859-1 -*- # Don't modify comment import wx
0
9089
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 VB6 for your project. First of all compile your VB6 Project & Make project EXE file then run the project EXE independently from the Icon. If your project is working perfectly Ok then make a setup file as given below. 1. Collect all the files of your...
2
1346
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 - http://www.windwardreports.com/film.htm
1
2240
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 include some resoureces into the EXE, e.g. an application icon. According to the author's description I prepared a file "testres.rc" with the following content: //==cut MAINICON ICON LOADONCALL MOVEABLE DISCARDABLE testres.ico //==cut where...
0
1445
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 a bmp and saving to disk or by saving the icon using a filestream. In both cases saving the file works fine. However, when I open the newly created file from explorer I notice something peculiar. The file has a black background. I would have...
1
3908
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 to properly serialize the System.Drawing.Icon structure to an XML file? The following code doesn't write the icon information to the xml file. private void CreateXmlFile(string filename) {
0
9703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10548
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10295
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6842
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.