Python Forum
looking fo documentation for module files
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
looking fo documentation for module files
#13
(Jul-31-2022, 10:04 AM)snippsat Wrote: So i would not advice using PYTHONPATH, use site module,and that has been my answer when this topic has been up before.
that document says:
Quote:This module is automatically imported during initialization. The automatic import can be suppressed using the interpreter’s -S option.

Importing this module will append site-specific paths to the module search path and add a few builtins, unless -S was used. In that case, this module can be safely imported with no automatic modifications to the module search path or additions to the builtins. To explicitly trigger the usual site-specific additions, call the site.main() function.

this is unclear. at first it says it is automatic. then it says what to call. is coding such a call going to suppress the automatic import?

then it says:
Quote:Changed in version 3.5: Support for the “site-python” directory has been removed.
now what to do? this is a long and complex setup. can someone who has done this just list the total changes they made (what went where)?

also:

is there an explanation of how things get run when doing a command with the -m option? are arguments in sys.argv as is done for normal commands? is there an advantage to making a command/script be run this way?

i just want to have a place to put modules in that may be for user coded scripts run from their home directories or scripts i add to /usr/local/bin as executables (that and /usr/host/bin), my place to put commands in (which may be bash scripts or binary (ELF) format files)).

why not a /usr/site directory?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
RE: looking fo documentation for module files - by Skaperen - Jul-31-2022, 11:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  finding which source files import a module Skaperen 3 2,637 Apr-22-2019, 09:28 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

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