On 12 April 2017 at 14:35, Kamal Mustafa <kamal.must...@gmail.com> wrote:
> Never mind. site._script() as pointed out by Wes Turner is what I need:-
>
> Python 3.4.2 (default, Oct  8 2014, 10:45:20)
> [GCC 4.9.1] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import site
>>>> site._script()
> sys.path = [
>     '',
>     '/usr/lib/python3.4',
>     '/usr/lib/python3.4/plat-x86_64-linux-gnu',
>     '/usr/lib/python3.4/lib-dynload',
>     '/usr/local/lib/python3.4/dist-packages',
>     '/usr/lib/python3/dist-packages',
> ]
> USER_BASE: '/home/kamal/.local' (exists)
> USER_SITE: '/home/kamal/.local/lib/python3.4/site-packages' (doesn't exist)
> ENABLE_USER_SITE: True

Unless you have to get this information from within the Python
interactive prompt, you can just run "python -m site" from the shell
prompt to get the same information.

Paul
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to