analitics

Pages

Showing posts with label python 3. Show all posts
Showing posts with label python 3. Show all posts

Monday, June 15, 2026

News : PRO GEOMETRIC MERMAID EDITOR – PYQT6 (v1.0) sell on gumroad

Today, I implemented a new system for selling my products, cheaper and more permissive, called: BUY AND HAVE MORE - SYSTEM. The idea is to have your product, specific tool, simple and good with a low price. I used many programming languages: Python, C#, Godot, FASM... I used artificial intelligence, I can use testing software ... This is my system that will help users and developers by: - using a low price for your tools - help work of developers with low prices, nothing can be 100% free - maintain the same software in time: on price, lifetime, and updates - buy more products from users and me, send me your development tasks - based on users asking who will have these products - do you want a specific development: send me an email with your price - you can ask even artist's work - don't spend your time, just use my time at a low price
From sales, I will reinvest in my technical development, in producing source code and producing art, according to my skills.
See this simple video tutorial with this python project script.

Monday, June 8, 2026

News : Wing Python IDE 12 Early Access.

Wing 12 is now available as an early access release that focuses on AI agent driven development. Wing 12 introduces deep integration with Claude Code, including a dedicated Claude Code tool, a new Tasks tool for planning, executing, and reviewing AI agent work, and a set of MCP servers that allow agents to work more efficiently by giving them access to Wing's source code analysis, unit testing, and debugger features.

Saturday, June 6, 2026

News : The new beta preview of Python 3.15.

Python 3.15 is still in development. This release, 3.15.0b2, is the second of four planned beta releases.
Beta release previews are intended to give the wider community the opportunity to test new features and bug fixes and to prepare their projects to support the new feature release.

Thursday, May 14, 2026

News : Good news from the Python Software Foundation 14.05.2026

Good news from the Python Software Foundation official blogger.
  • May 13, 2026 – The Python Software Foundation (PSF) is excited to announce that Hudson River Trading (HRT), a global leader in quantitative trading, has made a commitment to support Python and the PSF as a Visionary Sponsor.
  • May 12, 2026 - Announcing PSF Community Service Award Recipients!
  • May 11, 2026 - Strategic Planning at the PSF
  • May 10, 2026 - Python 3.14.5 is out!
  • May 7, 2026 - Python 3.15.0 beta 1 is here!
  • May 4, 2026 - Python 3.14.5 release candidate

Tuesday, May 5, 2026

News : the new python 3.15.0a8.

The Python programming language expected the new version 3.15.0a8 to come with this changelog and release date: XXXX-XX-XX.
Major features and changes
1. Interpreter and JIT optimizations
  • Much improved JIT with optimizations for int, float, list, and tuple operations.
  • Reduces redundant reference counting and adds new specializations (for example for enum.Enum and concatenations).
  • Supports unwinding JIT frames in GDB and GNU backtrace, and sets frame pointers for better profiling.
  • Free-threading improvements remove bottlenecks in sys.intern(), PyObject_SetAttr(), PyMutex, and PyDict_Watch(), improving multi-thread scaling.
  • Garbage collector returns to generational GC as the default and exposes new APIs for external GC monitoring.
  • Runtime optimizations reduce stack usage and fix O(N²) behavior in constant folding, and speed up yield from, bytes.replace(), and memoryview.cast().
2. Security hardening
  • Updates bundled cryptography libraries (for example newer OpenSSL versions in some builds).
  • Fixes path traversal issues in shutil.unpack_archive().
  • Hardens remote debugging related code paths.
  • Addresses crashes and recursion issues in xml.parsers.expat.
  • Adds stricter validation in http.cookies, webbrowser, configparser, and related modules.
  • Introduces tighter limits for TOML keys and canonical Base64 handling.
3. Standard library enhancements
  • Command-line tools like argparse, pdb, regrtest, pickletools, tokenize, calendar, timeit, and http.server gain extended colorized output.
  • The inspect command-line interface is significantly improved.
  • timeit adds a --target-time option for more predictable benchmarking.
  • Typing gains support for features such as disjoint base decorators and richer TypeVarTuple options (bound, covariant, contravariant).
  • ForwardRef representations become clearer and easier to read.
  • Regular expression APIs move toward re.prefixmatch() instead of re.match().
  • array and memoryview support complex number formats like Zf and Zd.
  • frozendict is better integrated with dataclasses, plistlib, and dictionary merging.
  • UserDict.popitem() now behaves in a predictable, ordered way.
  • json adds an array_hook for more flexible decoding.
  • email, IDNA, and importlib.metadata receive fixes for Unicode handling and corrupted metadata.
  • asyncio adds TaskGroup.cancel(), improves debugging, shutdown behavior, and event loop performance.
  • The profiling.sampling module gains dump snapshots, --jsonl output, and --diff-flamegraph for visual comparisons.
4. C API and extension changes
  • Implements a unified slot system for types, simplifying extension type definitions.
  • Adds a stable ABI variant for free-threaded builds (abi3t).
  • Introduces new, safer functions for garbage collector traversal.
  • Makes PyCriticalSection part of the Stable ABI.
  • Provides hooks like PyInterpreterState_SetEvalFrameAllowSpecialization for controlling specialization behavior.
5. Build system and platforms
  • Windows builds adopt a new layout and support free-threaded configurations.
  • Updates to toolchains such as WASI SDK and modern compilers.
  • Improves performance on AArch64 and x86_64 architectures.
  • Fixes issues with PGO, Clang, and LLVM-based builds.
  • Adds options like --enable-static-libpython-for-interpreter for more flexible embedding.
6. Developer experience and ergonomics
  • More extensive colorization in command-line tools and error messages.
  • Better suggestions and messages for AttributeError and similar exceptions.
  • More robust REPL behavior and nicer pretty-printing, including support for new string forms.
  • Smarter import-related completions and diagnostics for everyday workflows.

Saturday, May 2, 2026

Python 3.10.x : Install ComfyUI tool with python and Krita.

This is a basic install of ComfyUI tool with python 3.10 version.
git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI
python -m pip install -r requirements.txt
...
Successfully installed blake3-1.0.8 comfy-aimdo-0.3.0 comfy-kitchen-0.2.8 comfyui-embedded-docs-0.4.4 comfyui-frontend-package-1.42.15 comfyui-workflow-templates-0.9.66 comfyui-workflow-templates-core-0.3.221 comfyui-workflow-templates-media-api-0.3.73 comfyui-workflow-templates-media-image-0.3.133 comfyui-workflow-templates-media-other-0.3.187 comfyui-workflow-templates-media-video-0.3.83 glfw-2.10.0 kornia-0.8.2 kornia_rs-0.1.10 sentencepiece-0.2.1 simpleeval-1.0.7 spandrel-0.4.2 torchsde-0.2.6 trampoline-0.1.2
python main.py
You don't have all nodes for running, for example if you want to use with Krita then use this:

git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI

echo ================================================
echo   Install all need for ComfyUI
echo ================================================
python -m pip install -r requirements.txt

echo ================================================
echo   Install nodes Krita AI Diffusion
echo ================================================
cd custom_nodes

REM --- ControlNet Preprocessors ---
if not exist comfyui_controlnet_aux (
    git clone https://github.com/Fannovel16/comfyui_controlnet_aux
)

REM --- IP-Adapter Plus ---
if not exist ComfyUI_IPAdapter_plus (
    git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus
)

REM --- Tooling Nodes ---
if not exist comfyui-tooling-nodes (
    git clone https://github.com/Acly/comfyui-tooling-nodes
)

REM --- Inpaint Nodes ---
if not exist comfyui-inpaint-nodes (
    git clone https://github.com/Acly/comfyui-inpaint-nodes
)

cd ..

echo ================================================
echo   Install nodes
echo ================================================

REM --- ControlNet Aux ---
if exist custom_nodes\comfyui_controlnet_aux\requirements.txt (
    python -m pip install -r custom_nodes\comfyui_controlnet_aux\requirements.txt
)

REM --- IPAdapter Plus ---
if exist custom_nodes\ComfyUI_IPAdapter_plus\requirements.txt (
    python -m pip install -r custom_nodes\ComfyUI_IPAdapter_plus\requirements.txt
)

REM --- Tooling Nodes ---
if exist custom_nodes\comfyui-tooling-nodes\requirements.txt (
    python -m pip install -r custom_nodes\comfyui-tooling-nodes\requirements.txt
)

REM --- Inpaint Nodes ---
if exist custom_nodes\comfyui-inpaint-nodes\requirements.txt (
    python -m pip install -r custom_nodes\comfyui-inpaint-nodes\requirements.txt
)

echo ================================================
echo   Install packages
echo ================================================
python -m pip install blake3 comfy-aimdo comfy-kitchen comfyui-embedded-docs ^
comfyui-frontend-package comfyui-workflow-templates ^
comfyui-workflow-templates-core comfyui-workflow-templates-media-api ^
comfyui-workflow-templates-media-image comfyui-workflow-templates-media-other ^
comfyui-workflow-templates-media-video glfw kornia kornia_rs sentencepiece ^
simpleeval spandrel torchsde trampoline

echo ================================================
echo   Start ComfyUI
echo ================================================
python main.py

Monday, April 20, 2026

Python 3.12.13 : Colab example with Ipywidgets.

Ipywidgets are interactive HTML widgets for Jupyter notebooks and the IPython kernel that allow users to create GUIs (sliders, text boxes, checkboxes) to visualize and control data in real time. They enable dynamic data exploration and parameter tuning, with over 30 built-in, customizable controls for building interactive dashboards directly in Python code.
You can see on my GitHub Colab repo.

Tuesday, April 14, 2026

Python 3.13.0 : converting documents to Markdown.

Python tool for converting files and office documents to Markdown.
Easy to use:
markitdown path-to-file.pdf > document.md
Or use -o to specify the output file:
markitdown path-to-file.pdf -o document.md
You can also pipe content:
cat path-to-file.pdf | markitdown
The project can be found on this GitHub repo.
Let's install with these commands:
git clone https://github.com/microsoft/markitdown.git
Cloning into 'markitdown'...
remote: Enumerating objects: 2168, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 2168 (delta 0), reused 0 (delta 0), pack-reused 2162 (from 2)
Receiving objects: 100% (2168/2168), 4.15 MiB | 2.50 MiB/s, done.
Resolving deltas: 100% (1238/1238), done.
Updating files: 100% (161/161), done.

cd markitdown

python -m pip install -e "packages/markitdown[all]"
Obtaining file:///C:/Python313_64bit/markitdown/packages/markitdown
...
Successfully installed XlsxWriter-3.2.9 azure-ai-documentintelligence-1.0.2 azure-core-1.39.0 azure-identity-1.25.3 
cobble-0.1.4 coloredlogs-15.0.1 humanfriendly-10.0 isodate-0.7.2 magika-0.6.3 mammoth-1.11.0 markdownify-1.2.2 
markitdown-0.1.6b2 msal-1.36.0 msal-extensions-1.3.1 olefile-0.47 onnxruntime-1.20.1 pdfminer-six-20251230 
pdfplumber-0.11.9 pypdfium2-5.7.0 python-pptx-1.0.2 speechrecognition-3.16.0 standard-aifc-3.13.0 standard-chunk-3.13.0 
xlrd-2.0.2 youtube-transcript-api-1.0.3

Monday, April 13, 2026

Python 3.13.0 : bypasses pygame‑ce and use directly to Windows with ctypes.

Today, I test bypasses pygame‑ce and use directly to Windows, because the Python 3.13 + pygame‑ce 2.5.7, where DPI functions are missing.
You can read more about this idea on my pygame blogger, see the blogger post.
Windows exposes thousands of functions through: user32.dll, gdi32.dll, shcore.dll, kernel32.dll, dwmapi.dll.
If the OS provides the feature → Python can call it via ctypes.
Python can call Windows API functions directly whenever the OS provides a stable API, and you only perform operations that are safe at the OS level.
These are always safe to do from Python using ctypes, because they only interact with the OS, not with internal memory of another library.
  • Reading information
    • DPI
    • monitor list
    • window position
    • window size
    • screen resolution
    • system metrics
    • OS version
    • keyboard/mouse state
    • window styles
    • process info
  • Calling OS-level functions that modify the window
    • move window
    • resize window
    • change window title
    • change window transparency
    • change window z-order
    • set DPI awareness
    • toggle fullscreen
    • minimize / maximize
  • Creating new OS objects
    • timers
    • threads
    • windows (if you want)
    • file handles
    • pipes
    • events
  • Using OS-level graphics
    • GDI drawing
    • DWM effects
    • Aero shadow
    • blur behind window
  • Unsafe
    • Writing into internal memory of SDL2, Python, or any DLL
    • Overwriting function pointers
    • Injecting hooks
    • Modifying struct layouts
    • Freeing memory you don’t own
This is just one part of source code:
import pygame
import pygame._sdl2 as sdl2
import ctypes
import sys

pygame.init()

# Windows DPI API
user32 = ctypes.windll.user32
shcore = ctypes.windll.shcore

# Enable per-monitor DPI awareness
try:
    shcore.SetProcessDpiAwareness(2)
except:
    pass
...
user32.EnumDisplayMonitors(0, 0, MonitorEnumProc(_monitor_enum_proc), 0)
...

Python 3.13.0 : testing streamlit Python framework for data scientists and AI/ML engineers.

Streamlit is an open-source Python framework for data scientists and AI/ML engineers to deliver interactive data apps – in only a few lines of code.
I run the module streamlit directly, even if Windows cannot find the streamlit command:
python -m pip install streamlit
Collecting streamlit
  Downloading streamlit-1.56.0-py3-none-any.whl.metadata (9.8 kB)
...
Successfully installed altair-6.0.0 gitdb-4.0.12 gitpython-3.1.46 pydeck-0.9.1 smmap-5.0.3 streamlit-1.56.0
Let's test it:
python -m streamlit hello

      Welcome to Streamlit!

      If you'd like to receive helpful onboarding emails, news, offers, promotions,
      and the occasional swag, please enter your email address below. Otherwise,
      leave this field blank.

      Email: ←[0m

  You can find our privacy policy at https://streamlit.io/privacy-policy

  Summary:
  - This open source library collects usage statistics.
  - We cannot see and do not store information contained inside Streamlit apps,
    such as text, charts, images, etc.
  - Telemetry data is stored in servers in the United States.
  - If you'd like to opt out, add the following to %userprofile%/.streamlit/config.toml,
    creating that file if necessary:

    [browser]
    gatherUsageStats = false


  Welcome to Streamlit. Check out our demo in your browser.

  Local URL: http://localhost:8501
  Network URL: http://192.168.1.75:8501

  Ready to create your own Python apps super quickly?
  Head over to https://docs.streamlit.io

  May you create awesome apps!
... and result is this:

Saturday, April 11, 2026

Python 3.13.0 : new video with qiskit and Serotonină versus Formaldehidă python script.

I wrote about this python package on my blogs and it is very useful for those who study quantum theory. Today, seeing this video from I.B.M. I decided to see how it works on a particular case, obviously using the Gemini artificial intelligence from Google.
First of all, I was never good at chemistry because I started in elementary school on a different correct informational substrate and it didn't match my math... After academic studies I can now say that the assimilation is different and that's why I took this test with this python package.
About the script I used is an quantum simulation between Serotonină versus Formaldehidă with Hartree energy.
Terminology: It uses standard scientific terms like "Covalent Bond" (the strong link for formaldehyde) and "Signal Transmitted" (the function of serotonin).
The Hartree Energy (Eh) is the atomic unit of energy. It is defined by the energy of an electron in a hydrogen atom in its ground state (technically, it is twice the ionization energy of hydrogen).
Hamiltonian Clarity: clarify that II is the base energy while ZZ and XX represent the quantum correlations between the atoms.
Future-Proofing: By using real_amplitudes (lowercase), the script will remain functional even after Qiskit 3.0 is released and the older RealAmplitudes class is removed.
This script is a Quantum Variational Eigensolver (VQE) simulation designed to calculate the lowest energy state (ground state) of two different molecular interactions.
The Quantum Template Ansatz (QTA) is a specialized strategy used in Variational Quantum Algorithms (VQAs), such as the Variational Quantum Eigensolver (VQE). In simple terms, an "Ansatz" is a mathematical guess or a starting structure.
The SLSQP (Sequential Least Squares Programming) optimizer is one of the most popular "classical" algorithms used in the hybrid quantum-classical loop. It is a gradient-based optimization method designed to solve non-linear programming problems.
What the script does
Defines the Problem - Hamiltonians : It converts chemical data into a "mathematical map" called a Hamiltonian. We used two different maps: one for Formaldehyde to simulating a strong, permanent bond and one for Serotonin to simulating a delicate, temporary signal.
Creates a Quantum Template Ansatz: It builds a quantum circuit (real_amplitudes) that acts as a flexible "key." The algorithm turns the "knobs" (parameters) of this key to find the shape that fits the energy map perfectly.
Finds the Minimum Energy: It uses a classical optimizer (SLSQP) to guide the quantum simulator until the lowest possible energy value is found.
Why you got this specific result
Formaldehyde (-2.7614 Hartree): The energy is very low (negative), which indicates a highly stable and strong "Covalent Bond." In chemistry, the more negative the energy, the harder it is to break that bond. This is why formaldehyde is dangerous—it "locks" onto proteins and doesn't let go.
Serotonin (-1.6942 Hartree): The energy is higher (less negative) than formaldehyde. This represents a "Transient Interaction." It is stable enough to send a signal to your brain, but weak enough to be released later so the receptor can reset.
The 0.01 Hartree Warning: We added a deliberate 0.01 error to simulate the "noise" of a real quantum computer. Because Serotonin's interaction is so delicate, an error of 0.59% is enough to make the simulation unreliable. This highlights why Chemical Accuracy is the biggest challenge in quantum medicine—if our "glasses" (the computer) are even slightly blurry, we cannot correctly predict if a drug will work.
In summary: Your result confirms that Formaldehyde is a permanent "toxin" while Serotonin is a flexible "messenger," and it proves that current quantum simulations need extreme precision to be biologically useful.
The result of the quantum simulation , over the magnitude.These small changes matter. Because a Hartree is such a large unit of energy, researchers often convert the final result into units used in a lab setting. While 74 Hartrees sounds like a lot, chemical reactions happen in the "milli-Hartree" range. See result:
--- QUANTUM SIMULATION INPUT PARAMETERS ---
Formaldehyde Hamiltonian: [('II', -1.8572), ('IZ', 0.45), ('ZI', -0.45), ('ZZ', -0.02), ('XX', 0.21)]
Serotonin    Hamiltonian: [('II', -1.1245), ('IZ', 0.28), ('ZI', -0.28), ('ZZ', -0.01), ('XX', 0.15)]
------------------------------------------------------------

--- QUANTUM ANALYSIS: PROTEIN INTERACTION ---

[FORMALDEHYDE + PROTEIN]
  Ideal Energy: -2.7614 Hartree
  Energy with Noise (0.01): -2.7514 Hartree
  Status: DANGER - Stable Covalent Bond

[SEROTONIN + RECEPTOR]
  Ideal Energy: -1.6942 Hartree
  Energy with Noise (0.01): -1.6842 Hartree
  Status: ACTIVE - Signal Transmitted

============================================================
CONCLUSION ON CHEMICAL ACCURACY:
An error of 0.01 Hartree represents 0.59% of Serotonin's energy.
WARNING: Error exceeds the safety threshold for biological prediction!
============================================================
This is the source code, created by Gemini artificial intelligence and tested by my:
import numpy as np
from qiskit.quantum_info import SparsePauliOp
from qiskit.circuit.library import real_amplitudes
from qiskit.primitives import StatevectorEstimator
from qiskit_algorithms import VQE
from qiskit_algorithms.optimizers import SLSQP

# --- QUANTUM SIMULATION INPUT DATA ---
# Formaldehyde + Protein (Strong Covalent bond simulation)
# High base energy (-1.85) and strong coupling terms
formaldehyde_input = [
    ("II", -1.8572), ("IZ", 0.45), ("ZI", -0.45), ("ZZ", -0.02), ("XX", 0.21)
]

# Serotonin + Receptor (Delicate Neurotransmitter interaction)
# Lower base energy (-1.12) and sensitive correlation terms
serotonin_input = [
    ("II", -1.1245), ("IZ", 0.28), ("ZI", -0.28), ("ZZ", -0.01), ("XX", 0.15)
]

def run_quantum_vqe(input_data):
    """Executes the VQE algorithm using the modern StatevectorEstimator."""
    hamiltonian = SparsePauliOp.from_list(input_data)
    # Using the functional 'real_amplitudes' to avoid Deprecation Warnings
    ansatz = real_amplitudes(num_qubits=2, reps=1)
    estimator = StatevectorEstimator()
    optimizer = SLSQP(maxiter=100)
    
    vqe = VQE(estimator, ansatz, optimizer)
    result = vqe.compute_minimum_eigenvalue(hamiltonian)
    return result.eigenvalue.real

# Execution
print("--- QUANTUM SIMULATION INPUT PARAMETERS ---")
print(f"Formaldehyde Hamiltonian: {formaldehyde_input}")
print(f"Serotonin    Hamiltonian: {serotonin_input}")
print("-" * 60)

# Computing Ideal Energies
ideal_energy_form = run_quantum_vqe(formaldehyde_input)
ideal_energy_sero = run_quantum_vqe(serotonin_input)

# Simulating the Chemical Accuracy Threshold (0.01 Hartree)
chemical_accuracy_threshold = 0.01
noisy_energy_form = ideal_energy_form + chemical_accuracy_threshold
noisy_energy_sero = ideal_energy_sero + chemical_accuracy_threshold

# --- FINAL QUANTUM ANALYSIS OUTPUT ---
print("\n--- QUANTUM ANALYSIS: PROTEIN INTERACTION ---")

print(f"\n[FORMALDEHYDE + PROTEIN]")
print(f"  Ideal Energy: {ideal_energy_form:.4f} Hartree")
print(f"  Energy with Noise (0.01): {noisy_energy_form:.4f} Hartree")
print(f"  Status: {'DANGER - Stable Covalent Bond' if ideal_energy_form < -1.5 else 'Inactive'}")

print(f"\n[SEROTONIN + RECEPTOR]")
print(f"  Ideal Energy: {ideal_energy_sero:.4f} Hartree")
print(f"  Energy with Noise (0.01): {noisy_energy_sero:.4f} Hartree")
print(f"  Status: {'ACTIVE - Signal Transmitted' if ideal_energy_sero < -1.0 else 'Binding Failure'}")

print("\n" + "="*60)
print("CONCLUSION ON CHEMICAL ACCURACY:")
error_percentage = (chemical_accuracy_threshold / abs(ideal_energy_sero)) * 100
print(f"An error of 0.01 Hartree represents {error_percentage:.2f}% of Serotonin's energy.")
if error_percentage > 0.5:
    print("WARNING: Error exceeds the safety threshold for biological prediction!")
print("="*60)

Thursday, April 9, 2026

Python 3.14.3 : Simple project with django version 6.0.4 on Fedora 44 beta 12.

Today I used Fedora 44 beta 12 server on VirtualBox, and I wanted to test how Python works with Django on this Linux distribution. In the Fedora distribution, I have Python version 3.14.3 and Django version 6.0.4. I created a basic project with multiple pages, CSS, JavaScript, and an admin interface. It seems that Django is functional, and the result is very good for a basic project.:

Sunday, March 29, 2026

News : Released v3.9.0 for NiceGUI.

The nicegui python package was released few days ago on the GitHub project, you can install with the pip tool:
python -m pip install nicegui
WARNING: Ignoring invalid distribution ~adquery-ocp (C:\Python313_64bit\Lib\site-packages)
Collecting nicegui
  Downloading nicegui-3.9.0-py3-none-any.whl.metadata (11 kB)
...
Successfully installed aiofiles-25.1.0 httptools-0.7.1 ifaddr-0.2.0 lxml-html-clean-0.4.4 markdown2-2.5.5 nicegui-3.9.0
You can find some examples on the official webpage.

Monday, March 23, 2026

News : Release 0.8.0 of mt940 library.

The mt940 is a library to parse MT940 files. MT940 is a specific SWIFT message type used by the SWIFT network to send and receive end-of-day bank account statements.
The install is easy with the pip tool:
pip install mt940==0.8.0
See the type file MT940 and the .
See the released on the official webpage.

Thursday, March 12, 2026

News : Major new features of the 3.15 series, compared to 3.14

Python 3.15 is still in development. This release, 3.15.0a7, is the seventh of eight planned alpha releases.
...The JIT compiler has been significantly upgraded, with 3-4% geometric mean performance improvement on x86-64 Linux over the standard interpreter, and 7-8% speedup on AArch64 macOS over the tail-calling interpreter

Wednesday, March 11, 2026

Saturday, February 28, 2026

Python 3.13.0 : simple script for update all python packages.

Simple script for update all python packages:
import subprocess
import sys
import datetime

log_file = "upgrade_log.txt"

def log(msg):
    with open(log_file, "a", encoding="utf-8") as f:
        f.write(msg + "\n")
    print(msg)

def get_installed_packages():
    result = subprocess.run(
        [sys.executable, "-m", "pip", "list", "--format=freeze"],
        capture_output=True,
        text=True
    )
    lines = result.stdout.strip().split("\n")
    packages = []
    for line in lines:
        if "@" in line:  # skip direct URL installs
            pkg = line.split("@")[0]
        else:
            pkg = line.split("==")[0]
        packages.append(pkg)
    return sorted(packages)

def upgrade_package(package):
    log(f"\n=== Updating: {package} ===")
    try:
        subprocess.check_call([sys.executable, "-m", "pip", "install", "--upgrade", package])
        log(f"[OK] Updated: {package}")
    except subprocess.CalledProcessError:
        log(f"[FAILED] Could not update: {package}")

def main():
    log(f"\n--- Upgrade started at {datetime.datetime.now()} ---\n")

    packages = get_installed_packages()
    log(f"Found {len(packages)} packages.\n")

    for pkg in packages:
        upgrade_package(pkg)

    log(f"\n--- Upgrade finished at {datetime.datetime.now()} ---\n")

if __name__ == "__main__":
    main()