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
#36
(Aug-08-2022, 08:30 AM)Gribouillis Wrote:
(Aug-07-2022, 09:44 PM)Skaperen Wrote: Output:
lt1a/forums/3 /home/forums 7> python3.8 -S -c "import sys; print(sys.prefix, sys.exec_prefix, sys.base_exec_prefix)"
/usr /usr /usr
lt1a/forums/3 /home/foru
ms 8>
This means that before the import of the 'site' module, the prefixes are CORRECT! They get corrupted somewhere when you run without the -S option. Try this perhaps
Output:
python3.8 -S -c "import site; print(site.PREFIXES)"
and compare with
Output:
python3.8 -S -c "import site; site.main(); print(site.PREFIXES)"

Output:
lt1a/forums/1 /home/forums 47> python3.8 -S -c "import site; print(site.PREFIXES)" ['/usr', '/usr'] lt1a/forums/1 /home/forums 48> python3.8 -S -c "import site; site.main(); print(site.PREFIXES)" ['/usr', '/usr'] lt1a/forums/1 /home/forums 49>
looks the same and correct to me.
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 - Aug-09-2022, 03:05 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  finding which source files import a module Skaperen 3 2,531 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