pythonpython-2.7python-3.xtaskbar

How to place a python script into the taskbar without pinning it to python


I have a python script that i would like to pin to the taskbar, but it is pinned under python and it is annoying to hover over python to run my script. Is there any way to pin the program itself to the taskbar.

NOTE I am using windows 8


Solution

  • Python scripts are not normal computer programs. Windows, linux, or whatever family of OSs you use will not recognize them as programs. It will see them as text files because that's all python scripts are. If you have ever opened an EXE file in notepad you probably noticed that it's all gobbledy gook. It's all gibberish because that code has been compiled into a form that the computer can understand. Python scripts however are as I mentioned before not actual computer programs. They are just text files python reads and interprets the text file and then does interesting things accordingly.

    Now that you understand that, time for an actual solution. Since python scripts are not real programs we need a real program that can be launched from the computer. This is going to involve a little bit of C++ code because when C++ code is compiled, it compiles into a form that the computer can understand and treats as an actual computer program. First you need to download a piece of software called codeblocks.

    http://downloads.sourceforge.net/project/codeblocks/Binaries/16.01/Windows/codeblocks-16.01-setup.exe?r=http%3A%2F%2Fwww.codeblocks.org%2Fdownloads%2F26&ts=1454136927&use_mirror=netcologne

    Now create a new console project and type the following code into the project after you create it.

    #include <iostream>
    #include <stdlib.h>
    
    int main()
    {
    system("// The path to your script");
    return 0;
    }
    

    After you have that code entered click the compile button at the top and go to the path that your C++ program is located then you can pin the C++ program to your task bar which will then launch your python script.