How to determine if a Python script is being run right after startup on Windows

Krister Svanlund krister.svanlund at gmail.com
Tue Sep 7 06:19:02 EDT 2010


On Tue, Sep 7, 2010 at 11:43 AM, Dennis Verdonschot <thossie at gmail.com> wrote:
> Hi Ryan,
>
> Maybe I'm missing something, but wouldn't creating a shortcut and
> putting that shortcut in your Start - Programs - Startup section of
> the Windows menu not work for this program? Or if really needed you
> can edit the start-up programs in the registry.
>
> If you add some logging ability to your program you can verify it has
> been run and you can still use commandline arguments by changing the
> shortcut.
>
> --
> Dennis
> --
> http://mail.python.org/mailman/listinfo/python-list
>

I would recommend using a commandline switch (look at sys.argv in
documentation) and just start the script with something like
python script.py --change-wallpaper
or maybe require a switch for getting to the GUI...



More information about the Python-list mailing list