Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def create_shortcut(source, dest, *args):
    if os.name == 'nt':
        shell = win32com.client.Dispatch("WScript.Shell")
        shortcut = shell.CreateShortCut(dest + ".lnk")
        shortcut.Targetpath = source
        shortcut.Arguments = ' '.join(args)
        path, file = os.path.split(source)
        shortcut.WorkingDirectory = path
        # some other os may not support this, but throwing an error is good since
        # the function couldn't do what was requested
        os.symlink(source, dest)
        # linux also can't do args... maybe we should spit out a shell script?
        assert not args;

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/bittorrent.py   kamaelia(Download)
from BitTorrent.IPC import ipc_interface
from BitTorrent.prefs import Preferences
from BitTorrent.platform import doc_root, btspawn, path_wrap, os_version, is_frozen_exe, get_startup_dir, create_shortcut, remove_shortcut
from BitTorrent import zurllib
    def launch_on_startup(self, *args):
        dst = os.path.join(get_startup_dir(), app_name)
        if self.config['launch_on_startup']:
            src = os.path.abspath(sys.argv[0])
            create_shortcut(src, dst, "--start_minimized")