Python Forum
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
code to run in python3
#11
but i also want a way to go beyond the default, if it is there.  if python2.7 is the default but python3.5 is there then run it on python3.5 but if python2.7 is the default and nothing else is available, go ahead and run it on python2.7.

how do i get that to happen?

which is better between these: python2.7 and python3.1 ?

i could make a C program (usable on the #!/usr/bin/env line) to pick the "best" Python interpreter but i need the ranking info of major.minor versions.  is date of release good enough?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#12
Find is our friend here:

~ $ sudo find /usr/bin/ -executable -iname "python?.?"
/usr/bin/python2.7
/usr/bin/python3.6
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#13
but what will it do if the versions are 2.7 and 3.1?  which of those is "better"?

i went to python.org to see if i could find a list of versions and release dates, but the site cannot be accessed due to an invalid security certificate.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#14
You can always go to a site despite it not having a security cert.

3.1 would be "better" due to it being 3.x
Recommended Tutorials:
Reply
#15
(Nov-14-2017, 02:19 AM)metulburr Wrote: You can always go to a site despite it not having a security cert.

3.1 would be "better" due to it being 3.x
unless it has HSTS enabled and your browser enforces it,  i did not spend the time to go further after i figured out that the server no longer supported the domain.  i would just try later and hope they can fix it soon.  their DNS seems to be OK.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#16
I dont get a bad cert when i went there.
https://badssl.com/

But there is an option to proceed anyways at the bottom in chrome
   
Recommended Tutorials:
Reply
#17
i'm not going to switch to chrome.  can you get the details of the python.org cert?  i would like to know if it has expired or if chrome has a CA that firefox does not.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#18
You cna do the same thing in firefox.
Advanced -> Add Exception -> Confirm Security Exception

But i didnt add an exception to go there. Im getting secured

Attached Files

.zip   www.python.org.zip (Size: 2.21 KB / Downloads: 141)
Recommended Tutorials:
Reply
#19
"Advanced -> Add Exception -> Confirm Security Exception" is not available in Firefox when HSTS is on.

here is what i got.  this is after clicking on "Advanced" which added the box below it.:
http://linuxhomepage.com/free/python-dot...cert-0.png

i clicked on "SSL_ERROR_BAD_CERT_DOMAIN" as seen in blue in that box and got:
http://linuxhomepage.com/free/python-dot...d-cert.txt

yeah i know, Firefox is not very helpful.  but this also means a lot of the world cannot read the site.  and i deleted Opera over the weekend or i would have tried it in Opera.  i did try it in lynx, curl and netget.  it looks like may be a mis-signed cert (the reference to "alternate name").  strange that netget went to that IPv6 address, instead of the one that the DNS lookup gets

Output:
lt1/forums /home/forums 11> logcmd -s python-dot-org lynx -mime_header https://python.org/ Script started, file is ./20171114-211703-027668-python-dot-org.log 21:17:03 [27673] EXECUTING: 'lynx' '-mime_header' 'https://python.org/' Looking up python.org Making HTTPS connection to python.org lynx: Can't access startfile https://python.org/ [[ 0m0s real 0.646 - user 0.024 - sys 0.004 - 4.33% ]] 21:17:03 [27673] FINISHED - status = 1 Script done, file is ./20171114-211703-027668-python-dot-org.log lt1/forums /home/forums 12> a python.org python.org.        86400    in    a    23.253.135.79 lt1/forums /home/forums 13> logcmd -s python-dot-org lynx -mime_header https://23.253.135.79/ Script started, file is ./20171114-211753-027764-python-dot-org.log 21:17:53 [27769] EXECUTING: 'lynx' '-mime_header' 'https://23.253.135.79/' Looking up 23.253.135.79 Making HTTPS connection to 23.253.135.79 lynx: Can't access startfile https://23.253.135.79/ [[ 0m0s real 0.650 - user 0.016 - sys 0.008 - 3.69% ]] 21:17:53 [27769] FINISHED - status = 1 Script done, file is ./20171114-211753-027764-python-dot-org.log lt1/forums /home/forums 14> logcmd -s python-dot-org curl https://python.org/                 Script started, file is ./20171114-212012-027969-python-dot-org.log 21:20:12 [27974] EXECUTING: 'curl' 'https://python.org/' curl: (51) SSL: certificate subject name (www.python.org) does not match target host name 'python.org' [[ 0m0s real 0.803 - user 0.036 - sys 0.008 - 5.47% ]] 21:20:12 [27974] FINISHED - status = 51 Script done, file is ./20171114-212012-027969-python-dot-org.log lt1/forums /home/forums 15> logcmd -s python-dot-org netget https://python.org/ Script started, file is ./20171114-212322-028269-python-dot-org.log 21:23:22 [28274] EXECUTING: 'netget' 'https://python.org/' --2017-11-14 21:23:22--  https://python.org/ Resolving python.org (python.org)... 2a04:4e42:9::223 Connecting to python.org (python.org)|2a04:4e42:9::223|:443... connected. ERROR: no certificate subject alternative name matches     requested host name 'python.org'. To connect to python.org insecurely, use `--no-check-certificate'. [[ 0m2s real 2.563 - user 0.004 - sys 0.000 - 0.15% ]] 21:23:24 [28274] FINISHED - status = 5 Script done, file is ./20171114-212322-028269-python-dot-org.log lt1/forums /home/forums 16> aaaa python.org python.org.        86400    in    aaaa    2001:4802:7901:0:e60a:1375:0:6 lt1/forums /home/forums 17>

i totally missed the part where it gave a list of names that the cert is for.  the font was too small and Firefox would not enlarge it.  but i finally could read it when i enlarged the image capture.  the name "python.org" is not in the list.  and re-direction won't work until TLS recognizes the hostname that was used.  so they need to get a new cert.  this will, unfortunately, cost them another full certificate price, unless it was the CA that made the mistake.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#20
try adding www in the front. Anytime i go to there it redirects me to the url with www
https://www.python.org/

Is your firefox up to date?

If you think its an issue with the site put up an issue
https://github.com/python/pythondotorg/issues/
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  What the difference between python2 and python3 when they running my code. lpangfeic 1 1,831 Nov-19-2019, 04:44 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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