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
#15
(Jul-31-2022, 11:16 PM)Skaperen Wrote: why not a /usr/site directory?
You can use what folder you want,look at Gribouillis answer in post #6 or my post here.
If i do quick run on older Kali Linux that i where i use default Python and pyenv.
# make folder that want to use 
root@kali-tom:~$ mkdir /home/our_modules

# make a <sitecustomize.py> in our Python version
root@kali-tom:/usr/lib/python3.7$ vim sitecustomize.py

# Add in sitecustomize.py
import site

site.addsitedir('/home/our_modules')

# Test that it work
root@kali-tom:~# python3
Python 3.7.5 (default, Oct 27 2019, 15:43:29) 
[GCC 9.2.1 20191022] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> 
>>> sys.path
[ '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/dist-packages',
'/usr/lib/python3/dist-packages', '/home/our_modules']
>>> exit()
Quote:i generally target 3.5 and up, with my public code.
Python 3.5 can say is dead💀 as many modules/libraries dos not support for it anymore.
A core module for many other that many has dependencies of is Numpy.
Quote:The Python versions supported by this release 3.8-3.10. Python 3.11 will be supported when it reaches the rc stage.
Reply


Messages In This Thread
RE: looking fo documentation for module files - by snippsat - Aug-01-2022, 11:52 AM

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