There's nothing wrong with priority.
It is a common assumption that a low or medium priority set on a process will cause the operating system to limit the CPU time available to the process's threads - so, setting its priority higher should let it use more CPU!
But that is not what happens.
You can have a process set to the lowest possible priority, and if its code never needs to wait for anything, and if nothing else on the system wants CPU time, that process will get 100% of the CPU.
If a process gets less than 100% CPU, and nothing of equal or higher priority is trying to run, then that simply means that the process's threads are spending part of their time not wanting the CPU.
What is a thread doing if it doesn't want the CPU? Most of the time it's "waiting". Threads wait when they need something to happen that doesn't involve running the thread's own code in the CPU. Usually they're waiting for an I/O operation to complete. This could be an I/O request explicitly requested by the thread, or it could be, for example, a hard page fault. (On the other hand, time spent "waiting" for RAM read or write latency is all part of the thread's CPU time. That's not considered I/O.)
Your loop in Python includes a "print" funciton. That's an I/O operation, even if it's only to the screen.
You could use Windows Performance Analyzer to get details about just what pythonw.exe is doing that's making it wait.
You may wish to review my answer here.