Python Forum
Line by line execution of instructions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Line by line execution of instructions
#4
The compiler does not change the order of instructions. "Compiling" in Python consists of converting the source code to bytecode that is run by the Python interpreter. There is no optimization stage that can change the order of the instructions. Loops remain loops. They are not flattened,

Python programs are single threaded unless they are explicitly written to be multi-threaded or use multiprocessing. You don't have to worry about the python interpreter taking your program and running it on multiple processors without your knowledge.

If you are doing multi-processing, there is no automatic mechanism for doing so. You have to write the code to create subprocesses. When using multiprocessing, there is no automatic method for synchronization. You have to write extra code to synchronize the processes. This can be fairly simple if you just need to wait for a subprocess to complete (start/join, await) but is more complicated when trying to synchronize two processes while running.

Could you provide more information about your particular concerns and what you are trying to do?
Reply


Messages In This Thread
Line by line execution of instructions - by JosephR - Jul-22-2023, 01:26 PM
RE: Line by line execution of instructions - by deanhystad - Jul-24-2023, 09:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Printing the code line number arbiel 6 419 Yesterday, 08:01 AM
Last Post: arbiel
  How to add multi-line comment section? Winfried 3 503 Jun-04-2024, 07:24 AM
Last Post: Gribouillis
Information Is it possible to multi line a Basic Function Construct line statement? If so how? BrandonKastning 7 529 May-23-2024, 03:02 PM
Last Post: deanhystad
  Line graph with two superimposed lines sawtooth500 4 537 Apr-02-2024, 08:56 PM
Last Post: sawtooth500
  break print_format lengthy line akbarza 4 550 Mar-13-2024, 08:35 AM
Last Post: akbarza
  Reading and storing a line of output from pexpect child eagerissac 1 4,559 Feb-20-2024, 05:51 AM
Last Post: ayoshittu
  coma separator is printed on a new line for some reason tester_V 4 673 Feb-02-2024, 06:06 PM
Last Post: tester_V
  problem with spliting line in print akbarza 3 555 Jan-23-2024, 04:11 PM
Last Post: deanhystad
  Unable to understand the meaning of the line of code. jahuja73 0 461 Jan-23-2024, 05:09 AM
Last Post: jahuja73
  Receive Input on Same Line? johnywhy 8 1,087 Jan-16-2024, 03:45 AM
Last Post: johnywhy

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020