Closed mpheath closed 1 year ago
This looks great, thank you for contributing!
I will merge it within the next few days.
Ran the script on my Windows machine and it worked first try. Uploaded the results to the page here too, https://github.com/moltenform/scite-files/blob/main/files/api_files.md (although your script is even better because it can get the current site packages).
Update
mpheath_gen_python_3_api.py
Version set to 1.6 for Python 3.2 to 3.11 or later.
With Python v3.9+, soft keywords like
case
andmatch
are added to the output. Soft keyword_
is probably useless in an api file so it will not be added to the output.Tested in Windows 10 virtual machine. Had some issues with running the script with Python v3.11.2 . The use of shebang
causes the Windows Launcher
py.exe
to search the PATH forpython3
as the use ofenv
causes the PATH search. Windows 10 and Windows 11 distribute 0 byte sized files namedpython.exe
andpython3.exe
in PATH . To avoid this trap with trying to run 0 byte sized files, I changed the shebang toThe Python docs recommend
/usr/
... , though with a few examples to choose from and with UNIX based systems which may have different locations forpython3
, I chose just the filename itself and let it sort itself out.