← Back
Editing: shortcut.cpython-38.pyc
U W[� � @ s: d Z ddlmZ ddlZddlZdd� ZG dd� d�ZdS )z5 Creation of Windows shortcuts. Requires win32all. � )�shellNc C s t � }|�| � |S )zg Open an existing shortcut for reading. @return: The shortcut object @rtype: Shortcut )�Shortcut�load)�filenameZsc� r �9/usr/lib/python3/dist-packages/twisted/python/shortcut.py�open s r c @ s2 e Zd ZdZddd�Zdd� Zdd � Zd d� ZdS ) r z A shortcut on Win32. Nr c C s� t �tjdt jtj�| _|dk r2| �tj � |�� |dk rD| �|� |dk rV| �|� |dk rp| � tj � |�� |dk r�| �tj � |�|� 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)� pythoncomZCoCreateInstancer ZCLSID_ShellLinkZCLSCTX_INPROC_SERVERZIID_IShellLink�_baseZSetPath�os�path�abspathZSetArgumentsZSetDescriptionZSetWorkingDirectoryZSetIconLocation)�selfr Z argumentsZdescriptionZ workingdirZiconpathZiconidxr r r �__init__"