Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/twisted/python/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/twisted/python/shortcut.pyc

ó
[³XMc@sNdZddlmZddlZddlZd„Zddd„ƒYZdS(s4Creation of  Windows shortcuts.

Requires win32all.
iÿÿÿÿ(tshellNcCstƒ}|j|ƒ|S(sbOpen an existing shortcut for reading.

    @return: The shortcut object
    @rtype: Shortcut
    (tShortcuttload(tfilenametsc((s;/usr/lib/python2.7/dist-packages/twisted/python/shortcut.pytopens	
RcBsDeZdZddddddd„Zd„Zd„Zd„ZRS(sA shortcut on Win32.
    >>> sc=Shortcut(path, arguments, description, workingdir, iconpath, iconidx)
    @param path: Location of the target
    @param arguments: If path points to an executable, optional arguments to
                      pass
    @param description: Human-readable decription 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
    ic
CsÃtjtjdtjtjƒ|_tddt	j
j|ƒ||t	j
j|ƒt	j
j|ƒgdƒ}x6|D].\}}	|rt|	rtt||	ƒ|ƒqtqtW|r¿|j
||ƒndS(Ns"%s"tSetPathtSetArgumentstSetDescriptiontSetWorkingDirectory(RRRR	(t	pythoncomtCoCreateInstanceRtCLSID_ShellLinktNonetCLSCTX_INPROC_SERVERtIID_IShellLinkt_basetmaptostpathtabspathtgetattrtSetIconLocation(
tselfRt	argumentstdescriptiont
workingdirticonpathticonidxtdatatvaluetfunction((s;/usr/lib/python2.7/dist-packages/twisted/python/shortcut.pyt__init__&s	!	cCs |jjtjƒj|ƒdS(sRead a shortcut file from disk.N(RtQueryInterfaceR
tIID_IPersistFiletLoad(RR((s;/usr/lib/python2.7/dist-packages/twisted/python/shortcut.pyR=scCs#|jjtjƒj|dƒdS(sUWrite the shortcut to disk.

        The file should be named something.lnk.
        iN(RR!R
R"tSave(RR((s;/usr/lib/python2.7/dist-packages/twisted/python/shortcut.pytsaveAscCs9|dkrt|j|ƒStd|jj|f‚dS(NRs%s instance has no attribute %s(RRtAttributeErrort	__class__t__name__(Rtname((s;/usr/lib/python2.7/dist-packages/twisted/python/shortcut.pyt__getattr__HsN(R(t
__module__t__doc__R
R RR%R*(((s;/usr/lib/python2.7/dist-packages/twisted/python/shortcut.pyRs
		((R,twin32com.shellRR
RRR(((s;/usr/lib/python2.7/dist-packages/twisted/python/shortcut.pyt<module>s