1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Run python script at python startup

Discussão em 'Python' iniciado por Stack, Setembro 27, 2024.

  1. Stack

    Stack Membro Participativo

    I have a python executable called python.exe and and a launcher python-launcher.exe that preliminary sets environment variables before launching python.exe.

    If I run:

    python-launcher.exe -c "import sys; print(sys.executable)"


    I get python.exe printed. But the problem is that I need it to be python-launcher.exe.

    I thought maybe I could write a script that modifies executable import sys; sys.executable="python-launcher.exe" and that is called everytime python is launched?

    P.S. I cannot modify or recompile python-launcher.exe but I have an opportunity to set environment variables in .ini config file.

    Continue reading...

Compartilhe esta Página