Python Forum
How to do the same as python -m requests.certs inside script?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to do the same as python -m requests.certs inside script?
#1
This might be a dumb question -

in the command line, python -m requests.cert gives result:
/etc/pki/tls/certs/ca-bundle.crt

How is the right way to get the result inside python script?
#!/usr/bin/env python
import requets

result=requests.cert
print(result)
The script above returns result:
Output:
<module 'requests.certs' from '/usr/lib/python2.7/dist-packages/requests/certs.pyc'>
not sure why it is like this. I would like to get /etc/pki/tls/certs/ca-bundle.crt
Reply


Messages In This Thread
How to do the same as python -m requests.certs inside script? - by geekgeek - Feb-27-2020, 03:48 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to receive two passed cmdline parameters and access them inside a Python script? pstein 2 1,463 Feb-17-2024, 12:29 PM
Last Post: deanhystad
  Is there a *.bat DOS batch script to *.py Python Script converter? pstein 3 8,543 Jun-29-2023, 11:57 AM
Last Post: gologica
  python requests library .JSON() error mHosseinDS86 6 7,991 Dec-19-2022, 08:28 PM
Last Post: deanhystad
  Python requests oauth2 access token herobpv 6 7,651 Sep-27-2021, 06:54 PM
Last Post: herobpv
  Python Requests SSL Aussie 0 2,505 Jan-07-2021, 02:09 AM
Last Post: Aussie
  Python Requests Aussie 2 3,589 Dec-23-2020, 03:24 AM
Last Post: Aussie
  Python Requests package: Handling xml response soumyarani 1 3,167 Sep-14-2020, 11:41 AM
Last Post: buran
  Python API and requests deep_logic 9 6,492 Jul-29-2020, 03:47 PM
Last Post: ndc85430
  How to save Python Requests data sent to server? RedLeonard 5 10,577 Jul-05-2020, 10:33 AM
Last Post: RedLeonard
  How to kill a bash script running as root from a python script? jc_lafleur 4 8,388 Jun-26-2020, 10:50 PM
Last Post: jc_lafleur

Forum Jump:

User Panel Messages

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