/usr/lib/python3/dist-packages/twisted/python/__pycache__
Edit: /usr/lib/python3/dist-packages/twisted/python/__pycache__/shortcut.cpython-310.pyc (2464B)
o
¯bþ ã @ s: d Z ddlZddlZddlmZ dd„ ZG dd„ dƒZdS )z5
Creation of Windows shortcuts.
Requires win32all.
é N)Úshellc C s t ƒ }| | ¡ |S )zg
Open an existing shortcut for reading.
@return: The shortcut object
@rtype: Shortcut
)ÚShortcutÚload)ÚfilenameÚsc© r ú9/usr/lib/python3/dist-packages/twisted/python/shortcut.pyÚopen s
r c @ s> e Zd ZdZ ddd„Zdd„ Zdd „ Zd
d„ ZdS )
r z
A shortcut on Win32.
Nr c C s” t tjdt jtj¡| _|dur| tj
|¡¡ |dur"| |¡ |dur+| |¡ |dur8|
tj
|¡¡ |durH| tj
|¡|¡ dS dS )a½
@param path: Location of the target
@param arguments: If path points to an executable, optional arguments
to pass
@param description: Human-readable description of target
@param workingdir: Directory from which target is launched
@param iconpath: Filename that contains an icon for the shortcut
@param iconidx: If iconpath is set, optional index of the icon desired
N)Ú pythoncomÚCoCreateInstancer ÚCLSID_ShellLinkÚCLSCTX_INPROC_SERVERÚIID_IShellLinkÚ_baseÚSetPathÚosÚpathÚabspathÚSetArgumentsÚSetDescriptionÚSetWorkingDirectoryÚSetIconLocation)Úselfr Ú argumentsÚdescriptionÚ
workingdirÚiconpathÚiconidxr r r Ú__init__" s" ü
ÿzShortcut.__init__c C s | j tj¡ tj |¡¡ dS )z1
Read a shortcut file from disk.
N)r ÚQueryInterfacer
ÚIID_IPersistFileÚLoadr r r ©r r r r r r E s
ÿz
Shortcut.loadc C s" | j tj¡ tj |¡d¡ dS )z^
Write the shortcut to disk.
The file should be named something.lnk.
r N)r r r
r ÚSaver r r r" r r r ÚsaveM s ÿz
Shortcut.savec C s t | j|ƒS )N)Úgetattrr )r Únamer r r Ú__getattr__W s zShortcut.__getattr__)NNNNNr )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r r r$ r' r r r r r s
ù#
r )r+ r r
Úwin32com.shellr r r r r r r Ú
s