ClickPyLogger
Ver.0.1.16 is now friendly to Store App Python.
[Ver.0.1.16 Bug]
I found a bug in the source code.
I made a mistake in the loading order of the Interpreter path.
(I will release Ver.0.1.18 soon. This is a bug fix. 2024/1/28)
Target users
for Windows.
for python programmers.
(However, I have never used anaconda. For this reason, I have never tested it on anaconda.)for those who find it troublesome to create batch files with only one line
but for those who want log files every time
and include a timestamp in the log file name.
Please also use it if you find it troublesome to run "activate.bat" every time in a venv environment.
Features
This software executes the python script file you created on python. With easy operation.
This software outputs the script execution results to a log file.
Log files are saved with timestamps under the "script_log" folder.This software saves the arguments in the registry so that you can use the same arguments next time.
For that purpose, create the extension ".cpylogger" in the same folder as the script file.This software does not associate with the extension ".py".
The extension ".py" can be used by associating it with your favorite editor or development environment.... And even on Windows, I love emacs.
On Linux (unix), this command is almost the same.
python hello.py | tee `date +"script_log/%Y-%m-%d_%H-%M-%S_hello.log"`
Recommended environment
By default, the python.exe used by this software is assumed to have been downloaded and installed from https://www.python.org/.
However, it should also work if you install it via the Microsoft Store.
Download
Please download from Microsoft Store.
https://www.microsoft.com/store/apps/9N6W5KH21ZW2
This software is available for free.
However, when someone presses the purchase button, my motivation to improve and add features increases.
Introduction
Clicking the .cpylogger instead of a batch file will run the script.
The execution results are output to the log file.
The file name of the log file is timestamped.Command line options are recorded in the registry.
This can be reused on the next run.
Getting Started
Just drag and drop the script file "hello.py".
As a result, "hello.cpylogger" is created in the same folder.
Set each option as necessary.
Technical information
Registry
The arguments when executed are saved in the registry below.
HKEY_CURRENT_USER\SOFTWARE\ClickPyLogger
In the case of StoreApp, it seems to be saved to the following file without polluting the OS registry.
C:\Users\<you>\AppData\Local\Packages\....\SystemAppData\Helium\User.dat
Stop Button
First 3 clicks:
Sends a signal to safely terminate the process.
This uses GenerateConsoleCtrlEvent(CTRL_C_EVENT) to fire a SIGINT.
Next click:
Kill the process.
This uses Process.kill().
Pops up a confirmation dialog before execution.
Python interpreter option
When using py.exe/python.exe, the following two options are recommended.
-u: prints stdout and stderr without delay.
-X utf8: run python in utf8 mode (If you want to avoid problems with output on Windows).