pylaunchy: Python plug-ins for Launchy

kshahar
2008-07-29
2013-05-29
  • kshahar
    kshahar
    2008-07-29

    Hi,
    I've written a launchy plugin called pylaunchy, which allows writing plugins as Python scripts.
    pylaunchy forwards the Launchy plugin API calls to python scripts it finds in the plugins/python directory.

    Download and source code can be found here:
    http://code.google.com/p/pylaunchy/

    To install, simply unpack the .zip file in the launchy root dir (e.g. c:\program files\launchy).
    Requirements for the compiled DLL:
    * Launchy 2.1 (or Launchy 2.0 with QT 4.4 dlls)
    * Python 2.5

    After installation, just hit Alt+Space and type "this is a test". You should see results coming from the skeleton.py python script.

    About pylaunchy:

    I tried to keep the pylaunchy API relatively close to the plugin API of Launchy.

    Currently it supports:
    * All plugin API messages, except for the GUI ones
    * Multiple scripts
    * Everything that python supports :)

    It still lacks:
    * Documentation
    * Access to launchy's settings (the QSettings instance)
    * Support for GUI integration with launchy
    * Full-scale examples

    Known issues:
    * I think it leaks memory somewhere in the C++ <--> Python route

    Included examples:
    Can be found in the plugins/python directory.
    * skeleton.py - A very minimal example
    * pyexplorey.py - Allows starting files from one of the current open Explorer.exe windows. It still needs some work. It is also consumes a lot of memory (because of COM)

    If you have any problem or suggestion, or you might want to help, please contact me.

    Shahar

     
    • kshahar
      kshahar
      2008-07-31

      A new version (0.5.2) was released. You can find it in http://code.google.com/p/pylaunchy/
      Please remove any existing scripts from plugins/python directory before installing.

      In this version:
      * Installer
      * First useful python plugin - "pygo-y". This is a python version of the old Go-Y plugin.
      * Minor bug fixes

      Help for pygo-y:
      * Install pylaunchy 0.5.2
      * Restart Launchy
      * Rebuild the catalog
      * Bring up Launchy (Alt+Space)
      * Type "Go" or "Focus" and press <TAB>, then the window name you want to focus on

      Known issues:
      * In pygo-y, if you press Go <TAB> some-text <TAB> <ENTER>, the script crashes Launchy

       
    • kshahar
      kshahar
      2008-08-02

      I've released version 0.6.1, please see the release notes in http://sourceforge.net/forum/forum.php?forum_id=852527.

      Note that the script plugins (currently only pygo-y) are available separately.

      The project has moved to SourceForge, the project page is http://sourceforge.net/projects/pylaunchy/

      Shahar

       
    • kshahar
      kshahar
      2008-08-13

      I've release version 0.7.2, changes can be seen in https://sourceforge.net/forum/forum.php?forum_id=856437

      Note the documentation project in http://pylaunchy.sourceforge.net/docs

      The extension is already pretty stable, now I need people to start writing wonderful scripts :)

       
    • kshahar
      kshahar
      2008-08-20

      I've release version 0.7.2, changes can be seen in https://sourceforge.net/forum/forum.php?forum_id=858645

      This version includes a new plugin which will be announced separately.

       
    • kshahar
      kshahar
      2008-08-28

      I've release version 0.7.6, changes can be seen in https://sourceforge.net/forum/forum.php?forum_id=861480

      This version includes bug fixes and documentation updates.

      The documentation website can be reached at http://pylaunchy.sourceforge.net/

       
    • kshahar
      kshahar
      2008-09-06

      I've released version 0.8.0, changes can be seen in http://sourceforge.net/forum/forum.php?forum_id=864184

      This version includes a new plugin - PyDiry, and some bug fixes.

      The documentation website can be reached at http://pylaunchy.sourceforge.net/

       
    • Shawn
      Shawn
      2008-09-11

      hmm somehow i can't get this plugin to work.
      - I installed python 2.5.2
      - I ran the pylaunchy installer
      - restarted launchy
      - reindexed launchy

      ... but the plugin didn't appear in the list.

      i also tried the manual copy of the plugin files but couldn't get it to work either...

       
      • kshahar
        kshahar
        2008-09-20

        Do you have Launchy 2.1.2 installed? 2.1.1 and less won't work

        If you have version 2.1.2 of Launchy, post the log files in PyLaunchy forums. The log files location is described here: http://pylaunchy.sourceforge.net/docs/faq.html#how-to-check-the-log-files

         
        • Shawn
          Shawn
          2008-09-20

          I do have the latest version (2.1.2) and there are no log files in both locations.
          So i assume there is a problem with the python installation? I have Python 2.5.2. The python command line works alright.

           
    • atreiju
      atreiju
      2008-09-13

      OMG! THANK YOU FOR THIS PLUGIN!

      I've seen this plugin here since weeks, but i have to admit, i just thought "Eh, whats Python? Isn't that an antique coding language, just used by some geeks? Who will need this? Certainly it must be difficult to use."

      Today I was bored and looked through your excellent documentary and figured out that the installation is really easy, and the scripts looked interesting...

      Now I'm using it since 2 days, and i can't live without it anymore :-D

      For example PyWebIndex helped me to index my Portable Firefox bookmark.html, a thing I missed so much, and webby couldn't do it!
      I'm using PyDiry for shortcuts to many of my document- and mp3-folders, which i didn't want to index directly in launchy before, because it spammed my suggestion-list.

      Hell, I'm excited! Thanks a lot. I can recommend this to everyone. It's easy to use and to install, and so worth it :-)

       
      • kshahar
        kshahar
        2008-09-20

        Thanks, I'm really glad you found everything useful. I've been using it like hell (especially PyWebIndex) but it's good to know others are using it as well.
        I didn't know Python is perceived in this way, maybe I need to change my advertising :)

         
    • Shawn
      Shawn
      2008-09-22

      any ideas on my case? Or any further details you want me to post?
      I would be great if I can get this to work :)

       
    • Karlo Magdic
      Karlo Magdic
      2008-10-29

      I success to do simple and powerfull calculator using Python eval(), it replaces my standard Calcy. Here is the code:

      import launchy
      import math;

      class PySimple(launchy.Plugin):
          def __init__(self):
              launchy.Plugin.__init__(self)
              self.name = "PySimple"
              self.hash = launchy.hash(self.name)
              self.icon = os.path.join(launchy.getIconsPath(), "pysimple.png")
         
          def init(self):
              pass
             
          def getID(self):
              return self.hash

          def getName(self):
              return self.name

          def getIcon(self):
              return self.icon
             
          def getLabels(self, inputDataList):
              pass   
             
          def getResults(self, inputDataList, resultsList):
              input = inputDataList[0].getText();
              try:
                  int(input[0]);
                  text1 = str(eval(input));
                  resultsList.append( launchy.CatItem(input, text1, self.getID(), self.getIcon()) );
              except:
                  pass;

          def getCatalog(self, resultsList):
              resultsList.push_back( launchy.CatItem( "PySimple", "Py", self.getID(), self.getIcon() ) )

          def launchItem(self, inputDataList, catItemOrig):
              pass;

             
      launchy.registerPlugin(PySimple) 

       
  • kshahar
    kshahar
    2010-10-29

    Finally, a new version of PyLaunchy is out. Version 0.9.0 introduces support for Launchy 2.5 and Python 2.7. Get it from here:
    https://sourceforge.net/projects/pylaunchy/

    Note: the installer version requires Python 2.7, but other versions are supported if the plugin is built from the source code.