Python Forum
Did interpreter 'compile' all import modules(from thrid-party)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Did interpreter 'compile' all import modules(from thrid-party)
#7
(Oct-18-2020, 07:09 AM)Gribouillis Wrote:
jamesyuan Wrote:If the installed modules are binary, does interpreter also need to convert it to bytecode at first when I import them?
I don't understand what you mean by 'binary'. If (C extension) modules are distributed as shared libraries (.dll or .so), they are not converted to python bytecode. You could also have compiled .pyc file on the module path without their python source file. They would be imported as well.
jamesyan Wrote:Does compiled C means the code is written in Python and compiled by C compiler.
No, standard python code cannot be compiled by a C compiler.

Thanks a lot, so, in general, all code(written by yourself and from third-party) will be converted into bytecode by interpreter, and then executed in virtual machine, right?
Reply


Messages In This Thread
RE: Did interpreter 'compile' all import modules(from thrid-party) - by jamesyuan - Oct-18-2020, 12:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Different Ways to Import Modules RockBlok 2 764 Dec-11-2023, 04:29 PM
Last Post: deanhystad
  Import Modules TheBunyip 4 1,393 Mar-10-2023, 04:47 PM
Last Post: buran
  Running 3rd party libs on Steam Deck (Arch Linux) with restricted access metulburr 0 2,053 Jan-07-2023, 10:41 PM
Last Post: metulburr
  a bunch of modules to import Skaperen 2 1,004 Nov-07-2022, 07:33 PM
Last Post: Gribouillis
  Avoid third party functions to wrote my python code into system debug-log? mark 9 2,470 Apr-09-2022, 08:41 PM
Last Post: mark
  How to use a function from third party library? rrowhe4d 2 2,001 Aug-31-2021, 04:30 PM
Last Post: Larz60+
  python interpreter won't import packages greenpy 1 2,089 Sep-11-2020, 07:47 PM
Last Post: buran
  installing third-party modules shabux 5 3,662 Apr-13-2020, 12:41 AM
Last Post: Larz60+
  Import all items from all modules from package DD169 3 2,252 Jan-25-2020, 12:33 PM
Last Post: buran
  How to detect third party packages used in the code SriRajesh 5 3,153 Sep-21-2019, 05:59 AM
Last Post: ndc85430

Forum Jump:

User Panel Messages

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