GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing docs.wxpython.org — wx.FileType — wxPython 4.3.2 Docs
|
Copy constructor. |
|
This function is primarily intended for GetOpenCommand and GetPrintCommand usage but may be also used by the application directly if, for example, you want to use some non-default command to open the file. |
|
Returns a tuple containing the verbs and commands arrays, corresponding for the registered information for this mime type. |
|
Returns a brief description for this file type: for example, “text document” for |
|
The returned string is the command to be executed in order to open/print/edit the file of the given type. |
|
Returns all extensions associated with this file type: for |
|
Return the icon associated with this mime type, if any. |
|
Returns a tuple containing the Icon for this file type, the file where the |
|
Returns a wx.IconLocation that can be used to fetch the icon for this mime type. |
|
Returns full MIME type specification for this file type: for example, “text/plain”. |
|
Same as GetMimeType but returns a list of types. This will usually contain |
|
Returns the command which must be executed (see wx.Execute()) in order |
|
Returns the command which must be executed (see Execute()) in order to |
Properties Summary¶See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
Class API¶Possible constructors:
FileType(ftInfo) -> None
This class holds information about a given file type.
Copy constructor.
ftInfo (wx.FileTypeInfo)
None
This function is primarily intended for GetOpenCommand and GetPrintCommand usage but may be also used by the application directly if, for example, you want to use some non-default command to open the file.
The function replaces all occurrences of:
s with the full file name
t with the MIME type
%{param} with the value of the parameter param using the wx.FileType.MessageParameters object you pass to it.
If there is no ‘s’ in the command string (and the string is not empty), it is assumed that the command reads the data on stdin and so the effect is the same as “ %s” were appended to the string.
Unlike all other functions of this class, there is no error return for this function.
command (string)
params (wx.FileType.MessageParameters)
str
Returns a tuple containing the verbs and commands arrays, corresponding for the registered information for this mime type.
params (FileType.MessageParameters)
Tuple[List[str], List[str]]
Returns a brief description for this file type: for example, “text document” for the “text/plain” MIME type.
str
The returned string is the command to be executed in order to open/print/edit the file of the given type.
If the string is empty, the lookup for the verb failed.
The name of the file is retrieved from the wx.FileType.MessageParameters class.
verb (string)
params (FileType.MessageParameters)
str
Added in version 4.1/wxWidgets-3.1.1.
See also
Returns all extensions associated with this file type: for example, it may contain the following two elements for the MIME type “text/html” (notice the absence of the leading dot): “html” and “htm”.
This function is not implemented on Windows, there is no (efficient) way to retrieve associated extensions from the given MIME type on this platform.
List[str]
Returns a tuple containing the Icon for this file type, the file where the icon is found, and the index of the image in that file, if applicable.
Any
Returns a wx.IconLocation that can be used to fetch the icon for this mime type.
Returns full MIME type specification for this file type: for example, “text/plain”.
str
Same as GetMimeType but returns a list of types. This will usually contain only one item, but sometimes, such as on Unix with KDE more than one type if there are differences between KDE< mailcap and mime.types.
List[str]
GetOpenCommand (self, params)
Returns the command which must be executed (see wx.Execute()) in order to open the file of the given type. The name of the file as well as any other parameters is retrieved from MessageParameters() class.
str
GetOpenCommand (self, filename)
Returns the command which should be used to open the given filename. An empty string is returned to indicate that an error occurred (typically meaning that there is no standard way to open this kind of files).
str
Returns the command which must be executed (see Execute()) in order to print the file of the given type. The name of the file is retrieved from the MessageParameters class.
str
See GetDescription
See GetExtensions
See GetIconInfo
See GetIconLocation
See GetMimeType
See GetMimeTypes