class Application(object): (source)
Known subclasses: zim.applications.StartFile, zim.applications.WebBrowser, zim.gui.applications.DesktopEntryDict
| Method | __eq__ |
Undocumented |
| Method | __init__ |
Constructor |
| Method | __repr__ |
Undocumented |
| Method | pipe |
Run the application in a sub-process and capture the output. Like run(), but connects to stdin and stdout for the sub-process. |
| Method | run |
No summary |
| Method | spawn |
No summary |
| Method | tryexec |
No summary |
| Constant | STATUS_OK |
Undocumented |
| Instance Variable | cmd |
the command and arguments as a tuple or a string (when given as a string it will be parsed for quoted arguments) |
| Instance Variable | tryexeccmd |
the command to check in tryexec(), if None fall back to first item of cmd |
| Property | name |
Undocumented |
| Static Method | _lookup |
Lookup cmd in PATH |
| Method | _checkargs |
Undocumented |
| Method | _cmd |
Undocumented |
zim.applications.StartFile, zim.applications.WebBrowser, zim.gui.applications.DesktopEntryDict| Parameters | |
| cmd | the command for the external application, either a string for the command, or a tuple or list with the command and arguments |
| tryexeccmd | command to check in tryexec() as string. If None will default to cmd or the first item of cmd. |
run(), but connects to stdin and stdout for the sub-process.| Parameters | |
| args | additional arguments to give to the command as tuple or list |
| cwd | the folder to set as working directory for the command |
| input | input for the command as string |
| Returns | |
| output as a list of lines | |
| Raises | |
ApplicationError | if the sub-process returned an error. |
| Note | |
| The data read is buffered in memory, so do not use this method if the data size is large or unlimited. | |
zim.applications.StartFile, zim.applications.WebBrowser, zim.gui.customtools.CustomToolDict| Parameters | |
| args | additional arguments to give to the command as tuple or list |
| cwd | the folder to set as working directory for the command |
| Raises | |
ApplicationError | if the sub-process returned an error. |
zim.applications.StartFile, zim.applications.WebBrowser| Parameters | |
| args | additional arguments to give to the command as tuple or list |
| callback | optional callback can be used to trigger when the application exits. The signature is:
callback(status, data)
where 'status' is the exit status of the process. The application object provides a constant 'STATUS_OK' which can be used to test if the application was successful or not. |
| data | additional data for the callback |
| cwd | the folder to set as working directory for the command |
| Returns | |
| the PID for the new process | |
zim.applications.StartFile, zim.applications.WebBrowser| Returns | |
| True when the executable was found |
zim.gui.applications.DesktopEntryDictzim.gui.applications.DesktopEntryDicttryexec(), if None fall back to first item of cmdzim.applications.StartFile, zim.applications.WebBrowser, zim.gui.applications.DesktopEntryDictUndocumented