Re: Best way to check if there is internet?

2022-02-26 Thread Robert Latest via Python-list
Chris Angelico wrote: > Every language learns from every other. Except Visual Basic, which didn't learn anything from anywhere, and all that can be learned from it is how not to do it. Ugh. -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to check if there is internet?

2022-02-26 Thread Peter J. Holzer
On 2022-02-22 12:31:42 +0400, Abdur-Rahmaan Janhangeer wrote: > A front end eng sent me this for how to check for the internet in JS > > https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-online > > But it also says: > > "This attribute is inheren

Re: Best way to check if there is internet?

2022-02-25 Thread Abdur-Rahmaan Janhangeer
> I never knew this. Where can I read more about this origin? https://python-history.blogspot.com/2009/01/personal-history-part-1-cwi.html?m=1 <> There are more sources which i cannot remember from the top of my head -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to check if there is internet?

2022-02-25 Thread Abdur-Rahmaan Janhangeer
Yes i know that JS has switch from before I was referring to the pattern matching proposal. I cannot find the original place i read it from but here's the github one https://github.com/tc39/proposal-pattern-matching -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to check if there is internet?

2022-02-25 Thread Greg Ewing
On 26/02/22 11:22 am, Chris Angelico wrote: What's the best language for swearing in? Ah, that one I can't help you with, although I've heard good things about French. :) Russian seems to be quite good for it too, judging by certain dashcam footage channels. -- Greg -- https://mail.python.org/

Re: Best way to check if there is internet?

2022-02-25 Thread Chris Angelico
On Sat, 26 Feb 2022 at 09:04, Barry Scott wrote: > > > > > On 25 Feb 2022, at 18:07, Abdur-Rahmaan Janhangeer > > wrote: > > > > Normally people put Python in the scripting category. > > I learnt typed languages like C++ and Java at first. > > People who learn languages like these tend to put >

Re: Best way to check if there is internet?

2022-02-25 Thread Barry Scott
> On 25 Feb 2022, at 18:07, Abdur-Rahmaan Janhangeer > wrote: > > Normally people put Python in the scripting category. > I learnt typed languages like C++ and Java at first. > People who learn languages like these tend to put > Python in a non-serious category. The post was > more ironic tha

Re: Best way to check if there is internet?

2022-02-25 Thread Michael F. Stemper
On 25/02/2022 14.30, 2qdxy4rzwzuui...@potatochowder.com wrote: On 2022-02-25 at 13:48:32 -0600, "Michael F. Stemper" wrote: On 25/02/2022 12.07, Abdur-Rahmaan Janhangeer wrote: I have been following language feature proposals from various languages. Some decide to avoid Python's route, but

Re: Best way to check if there is internet?

2022-02-25 Thread Chris Angelico
On Sat, 26 Feb 2022 at 07:32, <2qdxy4rzwzuui...@potatochowder.com> wrote: > > On 2022-02-25 at 13:48:32 -0600, > "Michael F. Stemper" wrote: > > > On 25/02/2022 12.07, Abdur-Rahmaan Janhangeer wrote: > > > > I have been following language feature proposals from various > > > languages. Some decide

Re: Best way to check if there is internet?

2022-02-25 Thread 2QdxY4RzWzUUiLuE
On 2022-02-25 at 13:48:32 -0600, "Michael F. Stemper" wrote: > On 25/02/2022 12.07, Abdur-Rahmaan Janhangeer wrote: > > I have been following language feature proposals from various > > languages. Some decide to avoid Python's route, but others have been > > trying hard to catch up with Python.

Re: Best way to check if there is internet?

2022-02-25 Thread Michael F. Stemper
On 25/02/2022 12.07, Abdur-Rahmaan Janhangeer wrote: I have been following language feature proposals from various languages. Some decide to avoid Python's route, but others have been trying hard to catch up with Python. One gleaming example is the switch case. JS recently proposed pattern match

Re: Best way to check if there is internet?

2022-02-25 Thread Chris Angelico
On Sat, 26 Feb 2022 at 05:09, Abdur-Rahmaan Janhangeer wrote: > > Normally people put Python in the scripting category. You have a very interesting definition of "normal". ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to check if there is internet?

2022-02-25 Thread Abdur-Rahmaan Janhangeer
Normally people put Python in the scripting category. I learnt typed languages like C++ and Java at first. People who learn languages like these tend to put Python in a non-serious category. The post was more ironic than litteral. After 5 years of following the mailing lists i realised that there

Re: Best way to check if there is internet?

2022-02-25 Thread Benjamin Schollnick
>>> Thanks for the in-between. I really like the Python comunity as, >>> even though it's a 'scripting' language, > > And we like you, even though you're only a ... > > In English, a statement like that is considered rather insulting. > >> To me, it's a programming language. In my usage, a "scri

Re: Best way to check if there is internet?

2022-02-25 Thread Grant Edwards
On 2022-02-25, Michael F. Stemper wrote: > On 25/02/2022 06.49, Abdur-Rahmaan Janhangeer wrote: > >> Thanks for the in-between. I really like the Python comunity as, >> even though it's a 'scripting' language, And we like you, even though you're only a ... In English, a statement like that is co

Re: Best way to check if there is internet?

2022-02-25 Thread Michael F. Stemper
On 25/02/2022 06.49, Abdur-Rahmaan Janhangeer wrote: Thanks for the in-between. I really like the Python comunity as, even though it's a 'scripting' language, To me, it's a programming language. In my usage, a "script" is a bunch of OS commands. -- Michael F. Stemper Life's too important to t

Re: Best way to check if there is internet?

2022-02-25 Thread Abdur-Rahmaan Janhangeer
Avi solved the captive portal problem above. It's by comparing the page content to a dynamic output. I was asking for wifi just in case i missed anything we did not yet discuss. I consider the thread closed, thanks everybody, it was very fruitful for me. Thanks for the in-between. I really like

Re: Best way to check if there is internet?

2022-02-23 Thread Robert Latest via Python-list
Abdur-Rahmaan Janhangeer wrote: > I've got my answers but the 'wandering' a bit > on this thread is at least connected to the topic ^^. > > Last question: If we check for wifi or ethernet cable connection? > > Wifi sometimes tell of connected but no internet connec

Re: Best way to check if there is internet?

2022-02-23 Thread Robert Latest via Python-list
Abdur-Rahmaan Janhangeer wrote: > Well, nice perspective. > > It's a valid consideration, sound theory > but poor practicality according to me. On the contrary: It is absolutely the right and only way to do it. > It you view it like this then between the moment > we press run or enter key on the

Re: Best way to check if there is internet?

2022-02-23 Thread 2QdxY4RzWzUUiLuE
the user wants is to go to an http: page in a > browser, and so don't bother to check for a captive portal, > that'll be annoying for people who want to fetch IMAP mail, > or run ssh, or load an https: page. Honest questions: If I'm captured by a portal, do I "have int

Re: Best way to check if there is internet?

2022-02-23 Thread Chris Angelico
On Thu, 24 Feb 2022 at 03:39, Akkana Peck wrote: > > 2qdxy4rzwzuui...@potatochowder.com writes: > > I think someone said it way upthread: don't check, just do whatever you > > came to do, and it will work or it will fail (presumably, your program > > can tell the difference, regardless of a past

Re: Best way to check if there is internet?

2022-02-23 Thread Akkana Peck
2qdxy4rzwzuui...@potatochowder.com writes: > I think someone said it way upthread: don't check, just do whatever you > came to do, and it will work or it will fail (presumably, your program > can tell the difference, regardless of a past snapshot of being able to > retrieve data from an arbitrary

Re: Best way to check if there is internet?

2022-02-22 Thread Dennis Lee Bieber
On Wed, 23 Feb 2022 07:08:27 +0300, Abdur-Rahmaan Janhangeer declaimed the following: >The upcoming operation is short enough and >though we cannot assume that it will be the case >when we are running the operation, we sensibly >assume it will still be the case. > >This is more an extra check to

Re: Best way to check if there is internet?

2022-02-22 Thread Abdur-Rahmaan Janhangeer
> > > Since you have to deal with things that you do not control changing > after you check what is the point in checking? You have to write the code > to recover anyway. > Well foe my usecase, the operation running is not in months or a really long time. As Avi mentionned above, that would be po

Re: Best way to check if there is internet?

2022-02-22 Thread Barry
upcoming it might be nice > to see if your key element is present. You might check for enough disk space before starting to ensure that you can write the results, again this is usually under your control. But you do not control the internet as an end user. As it is not under your control you

Re: Best way to check if there is internet?

2022-02-22 Thread Abdur-Rahmaan Janhangeer
I've got my answers but the 'wandering' a bit on this thread is at least connected to the topic ^^. Last question: If we check for wifi or ethernet cable connection? Wifi sometimes tell of connected but no internet connection. So it detected that there is or there is no interne

Re: Best way to check if there is internet?

2022-02-22 Thread Chris Angelico
On Wed, 23 Feb 2022 at 05:38, Avi Gross via Python-list wrote: > It sounds to me like your main issue is not whether the internet is up right > now but whether the user has an internet connection. If they run the program > on a laptop at home or work then they may well be connected, bu

Re: Best way to check if there is internet?

2022-02-22 Thread Avi Gross via Python-list
As usual, his discussion is wandering a bit. Yes, some things are not reliable but sometimes a heuristic answer is better than none. Internet connections are beyond flaky and worse the connection you want may be blocked for many reasons even if other connections you try are working. Any

Re: Best way to check if there is internet?

2022-02-22 Thread Abdur-Rahmaan Janhangeer
Well, nice perspective. It's a valid consideration, sound theory but poor practicality according to me. It you view it like this then between the moment we press run or enter key on the terminal, our Python interpreter might get deleted. We never know, it can happen. Though it's nice to go in a

Re: Best way to check if there is internet?

2022-02-22 Thread 2QdxY4RzWzUUiLuE
On 2022-02-09 at 11:15:34 +0400, Abdur-Rahmaan Janhangeer wrote: > I think for me having the internet means ability to request urls You can always ask. The real question is what will the response be? ;-) This entire exercise is a race condition, just like checking for that a file exi

Re: Best way to check if there is internet?

2022-02-22 Thread Chris Angelico
; > tiny function instead of > > > nothing > > > > > > > Here's a function that determines whether or not you have an internet > > connection. It's almost as reliable as some of the other examples > > given - I know this, because I tried it ten times, and it gave t

Re: Best way to check if there is internet?

2022-02-22 Thread Chris Green
Chris Angelico wrote: > On Tue, 22 Feb 2022 at 19:33, Abdur-Rahmaan Janhangeer > wrote: > > > > As discussed here but, it would have been nevertheless great to have this > > tiny function instead of > > nothing > > > > Here's a function that

Re: Best way to check if there is internet?

2022-02-22 Thread Chris Angelico
; tiny function instead of > >> nothing > >> > > Here's a function that determines whether or not you have an internet > > connection. It's almost as reliable as some of the other examples > > given - I know this, because I tried it ten times, and it ga

Re: Best way to check if there is internet?

2022-02-22 Thread Antoon Pardon
Op 22/02/2022 om 09:40 schreef Chris Angelico: On Tue, 22 Feb 2022 at 19:33, Abdur-Rahmaan Janhangeer wrote: As discussed here but, it would have been nevertheless great to have this tiny function instead of nothing Here's a function that determines whether or not you have an int

Aw: Re: Best way to check if there is internet?

2022-02-22 Thread Karsten Hilbert
> Is there any value whatsoever in a lie? Do we _know_ it's a lie ? Does a lie become a Falsed Truth once it becomes known ? Karsten -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to check if there is internet?

2022-02-22 Thread Abdur-Rahmaan Janhangeer
Thanks for the function but i think having the function as described won't return True all time Me: dipping my foot in hot water, yes we can go ... In the sprit of "practicality beats purity", devs needs a function XD Kind Regards, Abdur-Rahmaan Janhangeer about

Re: Best way to check if there is internet?

2022-02-22 Thread Chris Angelico
Here's a function that determines whether or not you have an internet > connection. It's almost as reliable as some of the other examples > given - I know this, because I tried it ten times, and it gave the > correct result every time! > > def has_internet(): > re

Re: Best way to check if there is internet?

2022-02-22 Thread Chris Angelico
On Tue, 22 Feb 2022 at 19:33, Abdur-Rahmaan Janhangeer wrote: > > As discussed here but, it would have been nevertheless great to have this > tiny function instead of > nothing > Here's a function that determines whether or not you have an internet connection. It's almo

Re: Best way to check if there is internet?

2022-02-22 Thread Abdur-Rahmaan Janhangeer
A front end eng sent me this for how to check for the internet in JS https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-online But it also says: "This attribute is inherently unreliable. A computer can be connected to a network without having Internet access." As

Re: Best way to check if there is internet?

2022-02-09 Thread Avi Gross via Python-list
urned to being accurate within some seconds and asking for n*m can obviously be validated. Of course, once such a ploy is well known, it can be intercepted and sent proper results and still fool you into assuming you had full internet access.  So a site that you can send to and receive back

Re: Best way to check if there is internet?

2022-02-09 Thread Abdur-Rahmaan Janhangeer
> This won't work if you're behind a captive portal: every URL you try to get will return successfully, but the content will be the captive portal page. Yes agree a pretty common scenario if you are moving around ... The solution is to test against a webpage you know the content will always be the

Re: Best way to check if there is internet?

2022-02-09 Thread Abdur-Rahmaan Janhangeer
> Ah, but WHEN do those browsers report that? When attempting to connect to whatever the default "home" page has been set to? (Mine is configured to use https://www.google.com as the default page -- if my router is down, obviously the browser will time-out waiting for a response from Google, and r

Re: Best way to check if there is internet?

2022-02-09 Thread Akkana Peck
Abdur-Rahmaan Janhangeer writes: > results = [] > with console.status("Checking internet ...", spinner="dots"): > for domain in domains: > try: > requests.get(domain) > results.append(1) > except Exception as e: > results.append(0) > if no

Re: Best way to check if there is internet?

2022-02-09 Thread Gisle Vanem
def ensure_internet(): console = Console() domains = [ "https://google.com";, "https://yahoo.com";, "https://bing.com";, "https://www.ecosia.org";, "https://www.wikipedia.org

Re: Best way to check if there is internet?

2022-02-09 Thread Abdur-Rahmaan Janhangeer
= [ > > 'https://google.com', > > 'https://yahoo.com', > > 'https://bing.com', > > 'https://www.ecosia.org', > > 'https://www.wikipedia.org' > > ] > > results = [] > > with console.status("Checking

Re: Best way to check if there is internet?

2022-02-09 Thread Gisle Vanem
;, 'https://www.ecosia.org', 'https://www.wikipedia.org' ] results = [] with console.status("Checking internet ...", spinner="dots"): for domain in domains: try: requests.get(domain) results.append(1) except Exception as e: results.append(0) if not any(results):

Re: Best way to check if there is internet?

2022-02-08 Thread Abdur-Rahmaan Janhangeer
x27;https://www.wikipedia.org' ] results = [] with console.status("Checking internet ...", spinner="dots"): for domain in domains: try: requests.get(domain) results.append(1) except Exception as e: results.append(0) if not any(results): print('No int

Re: Best way to check if there is internet?

2022-02-08 Thread Alan Bawden
And I missed one that was just published last month: https://datatracker.ietf.org/doc/html/rfc9171 Unlike RFC 5050, this version of the protocol actually claims to be a "Proposed Standard". -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to check if there is internet?

2022-02-08 Thread Alan Bawden
me if some > sort of caching proxy system is deployed. Or the internet acquires a new protocol that's designed for very-long-latency connections. Very much a hot topic: https://www.nasa.gov/directorates/heo/scan/engineering/technology/disruption_tolerant_networking_overview htt

Aw: Re: Best way to check if there is internet?

2022-02-07 Thread Karsten Hilbert
> Or the internet acquires a new protocol that's designed > for very-long-latency connections. That's being worked on already https://en.wikipedia.org/wiki/NASA_Deep_Space_Network Karsten -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to check if there is internet?

2022-02-07 Thread Chris Angelico
ervers start supporting connection timeouts > >> measured in minutes or hours - but it wouldn't surprise me if some > >> sort of caching proxy system is deployed. > > > > Or the internet acquires a new protocol that's designed > > for very-long-latency connec

Re: Best way to check if there is internet?

2022-02-07 Thread Michael Torrie
ng proxy system is deployed. > > On the other hand, it also wouldn't surprise me if we do everything at > a high level instead - have a Martian PyPI mirror, Debian package > mirror, etc, etc, etc - and then build a mirror synchronization > protocol that uses UDP. > > Either w

Re: Best way to check if there is internet?

2022-02-07 Thread Ethan Furman
it wouldn't surprise me if some >> sort of caching proxy system is deployed. > > Or the internet acquires a new protocol that's designed > for very-long-latency connections. RocketNet -- a massive store-and-forward protocol. ;-) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to check if there is internet?

2022-02-07 Thread Greg Ewing
loyed. Or the internet acquires a new protocol that's designed for very-long-latency connections. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to check if there is internet?

2022-02-07 Thread Chris Angelico
On Tue, 8 Feb 2022 at 09:31, <2qdxy4rzwzuui...@potatochowder.com> wrote: > > On 2022-02-08 at 06:51:20 +1100, > Chris Angelico wrote: > > > Either way, though: would a person on Mars "have the internet"? Yes, > > but not the internet as we know it... >

Re: Best way to check if there is internet?

2022-02-07 Thread 2QdxY4RzWzUUiLuE
On 2022-02-08 at 06:51:20 +1100, Chris Angelico wrote: > Either way, though: would a person on Mars "have the internet"? Yes, > but not the internet as we know it... By current definition, they *can't* have the internet as we know it. Wikipedia,¹ Mirrian-Webster,² and Tech

Re: Best way to check if there is internet?

2022-02-07 Thread Chris Angelico
On Tue, 8 Feb 2022 at 08:30, Cameron Simpson wrote: > > On 08Feb2022 06:51, Chris Angelico wrote: > >Some day, we'll have people on Mars. They won't have TCP connections - > >at least, not unless servers start supporting connection timeouts > >measured in minutes or hours - but it wouldn't surpri

Re: Best way to check if there is internet?

2022-02-07 Thread Cameron Simpson
On 08Feb2022 06:51, Chris Angelico wrote: >Some day, we'll have people on Mars. They won't have TCP connections - >at least, not unless servers start supporting connection timeouts >measured in minutes or hours - but it wouldn't surprise me if some >sort of caching proxy system is deployed. The T

Re: Best way to check if there is internet?

2022-02-07 Thread Cameron Simpson
27;s seen his upstream provider have good G connectivity and degraded C connectiviy :-( >If that doesn't work, then you ask 'route -n' for the IP address of >the default gateway, I tend to just check for the presence of the default route for services which should be "u

Re: Best way to check if there is internet?

2022-02-07 Thread Grant Edwards
On 2022-02-07, Dennis Lee Bieber wrote: > On Mon, 07 Feb 2022 11:40:24 -0800 (PST), Grant Edwards > declaimed the following: > >>On 2022-02-07, Dennis Lee Bieber wrote: >> >>> Also, for a machine freshly booted, with no cache, even pinging >>> Google first requires making contact with a DNS serve

Re: Best way to check if there is internet?

2022-02-07 Thread Dennis Lee Bieber
On Mon, 07 Feb 2022 11:40:24 -0800 (PST), Grant Edwards declaimed the following: >On 2022-02-07, Dennis Lee Bieber wrote: > >> Also, for a machine freshly booted, with no cache, even pinging >> Google first requires making contact with a DNS server to ask for >> Google's IP address. With no netw

Re: Best way to check if there is internet?

2022-02-07 Thread Chris Angelico
On Tue, 8 Feb 2022 at 06:41, Grant Edwards wrote: > But, as has been pointed out previously "if there is internet" is too > vague a question to have an answer. > > If all you have is proxied access to outside HTTPS servers, then I > would consider the answer to be "

Re: Best way to check if there is internet?

2022-02-07 Thread Grant Edwards
ay, and try pinging that. It's possible your default gateway is alive but configured to ignore ICMP ping requests, but I've never run into one like that. But, as has been pointed out previously "if there is internet" is too vague a question to have an answer. If all you have is p

Re: Best way to check if there is internet?

2022-02-07 Thread Dennis Lee Bieber
On Mon, 7 Feb 2022 13:33:54 +0400, Abdur-Rahmaan Janhangeer declaimed the following: >Popular browsers tell: No internet connection detected. A function that >goes in the same sense. Unless they too are pinging Google.com to check ... > Ah, but WHEN do those browsers report t

Re: Best way to check if there is internet?

2022-02-07 Thread Chris Angelico
On Mon, 7 Feb 2022 at 23:48, Lars Liedtke wrote: > > Each Browser is doing it differently and even Windows or > Linux-Desktopmanagers (NetworkManager). > > I have had cases, where one tool told me I had Internet and another one > I hadn't. Not at all surprised :) Thou

Re: Best way to check if there is internet?

2022-02-07 Thread Lars Liedtke
(NetworkManager). I have had cases, where one tool told me I had Internet and another one I hadn't. So What Chris Angelico wrote is propably the best way, ping e.g. Google, do a DNS lookup and try http for Status 200. Each with its own Errorhandling and if you have got all three, then

Re: Best way to check if there is internet?

2022-02-07 Thread Lars Liedtke
Each Browser is doing it differently and even Windows or Linux-Desktopmanagers (NetworkManager). I have had cases, where one tool told me I had Internet and another one I hadn't. So What Chris Angelico wrote is propably the best way, ping e.g. Google, do a DNS lookup and try http for S

Re: Best way to check if there is internet?

2022-02-07 Thread Abdur-Rahmaan Janhangeer
Popular browsers tell: No internet connection detected. A function that goes in the same sense. Unless they too are pinging Google.com to check ... Kind Regards, Abdur-Rahmaan Janhangeer about <https://compileralchemy.github.io/> | blog <https://www.pythonkitchen.com> github <htt

Re: Best way to check if there is internet?

2022-02-07 Thread Chris Angelico
On Mon, 7 Feb 2022 at 20:18, Abdur-Rahmaan Janhangeer wrote: > > Greetings, > > Using the standard library or 3rd party libraries, what's the > best way to check if there is internet? Checking if google.com > is reachable is good but I wonder if there is a more native, &g

Best way to check if there is internet?

2022-02-07 Thread Abdur-Rahmaan Janhangeer
Greetings, Using the standard library or 3rd party libraries, what's the best way to check if there is internet? Checking if google.com is reachable is good but I wonder if there is a more native, protocol-oriented way of knowing? Even this URL recommends checking if a domain is up as a w

Re: install on host not connected to the internet and no local proxy

2017-11-02 Thread Paul Moore
On 2 November 2017 at 07:17, Chris Angelico wrote: > On Thu, Nov 2, 2017 at 5:50 PM, Noah wrote: >> Hi, >> >> I am trying to install a python package with about 80 dependencies on a >> server that is not connected to the internet and has no local proxy. I can >&g

Re: install on host not connected to the internet and no local proxy

2017-11-02 Thread Chris Angelico
On Thu, Nov 2, 2017 at 5:50 PM, Noah wrote: > Hi, > > I am trying to install a python package with about 80 dependencies on a > server that is not connected to the internet and has no local proxy. I can > ssh to it via VPN. > > I was able to find python bundle and download

install on host not connected to the internet and no local proxy

2017-11-02 Thread Noah
Hi, I am trying to install a python package with about 80 dependencies on a server that is not connected to the internet and has no local proxy. I can ssh to it via VPN. I was able to find python bundle and download the tarballs for all the main python package and all the tarballs for the

Re: Python package to accept payments in Internet

2017-05-09 Thread Paul Rubin
Chris Warrick writes: > there might be other users that will avoid your package for licensing > reasons. And there also might be other users who embrace the package for those same reasons. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python package to accept payments in Internet

2017-05-04 Thread Victor Porton
Gregory Ewing wrote: > Victor Porton wrote: >> You carp with words, finding a problem where there is no real problem, >> just words (I mean the word "hack") which sound like a problem. > > Words are important. The very fact that it sounds like a > problem *is* a problem if you're trying to persua

Re: Python package to accept payments in Internet

2017-05-03 Thread Victor Porton
On Wed, 2017-05-03 at 17:02 +0200, Chris Warrick wrote: > On 3 May 2017 at 16:45, Victor Porton wrote: > > Steve D'Aprano wrote: > >  > > > On Wed, 3 May 2017 02:19 am, Victor Porton wrote: > > >  > > > > I have created a full featu

Re: Python package to accept payments in Internet

2017-05-03 Thread Gregory Ewing
Victor Porton wrote: You carp with words, finding a problem where there is no real problem, just words (I mean the word "hack") which sound like a problem. Words are important. The very fact that it sounds like a problem *is* a problem if you're trying to persuade people to use your software, e

Re: Python package to accept payments in Internet

2017-05-03 Thread Gregory Ewing
Chris Warrick wrote: Also, this line looks unconvincing: # This is a quick hack. For serious work use https://github.com/paypal/PayPal-Python-SDK instead. Surely there's no such thing as non-serious work when you're handling other people's money? -- Greg -- https://mail.python.org/mailman/li

Re: Python package to accept payments in Internet

2017-05-03 Thread Chris Warrick
On 3 May 2017 at 17:58, Victor Porton wrote: > Chris Warrick wrote: > >> On 3 May 2017 at 17:19, Victor Porton wrote: >>> What do you mean by "banned"? Does this mean that Google does not use >>> software of this license? >> >> https://opensource.google.com/docs/using/agpl-policy/ >> https://www.

Re: Python package to accept payments in Internet

2017-05-03 Thread alister
On Wed, 03 May 2017 18:58:50 +0300, Victor Porton wrote: > Chris Warrick wrote: > >> On 3 May 2017 at 17:19, Victor Porton wrote: >>> What do you mean by "banned"? Does this mean that Google does not use >>> software of this license? >> >> https://opensource.google.com/docs/using/agpl-policy/ >

Re: Python package to accept payments in Internet

2017-05-03 Thread Victor Porton
Chris Warrick wrote: > On 3 May 2017 at 17:19, Victor Porton wrote: >> What do you mean by "banned"? Does this mean that Google does not use >> software of this license? > > https://opensource.google.com/docs/using/agpl-policy/ > https://www.theregister.co.uk/2011/03/31/google_on_open_source_lic

Re: Python package to accept payments in Internet

2017-05-03 Thread Chris Warrick
On 3 May 2017 at 17:19, Victor Porton wrote: > What do you mean by "banned"? Does this mean that Google does not use > software of this license? https://opensource.google.com/docs/using/agpl-policy/ https://www.theregister.co.uk/2011/03/31/google_on_open_source_licenses/ > My package is a profes

Re: Python package to accept payments in Internet

2017-05-03 Thread Victor Porton
On Wed, 2017-05-03 at 17:02 +0200, Chris Warrick wrote: > On 3 May 2017 at 16:45, Victor Porton wrote: > > Steve D'Aprano wrote: > > > > > On Wed, 3 May 2017 02:19 am, Victor Porton wrote: > > > > > > > I have created a full featu

Re: Python package to accept payments in Internet

2017-05-03 Thread Chris Warrick
On 3 May 2017 at 16:45, Victor Porton wrote: > Steve D'Aprano wrote: > >> On Wed, 3 May 2017 02:19 am, Victor Porton wrote: >> >>> I have created a full featured package to accept payments in Internet >>> (currently supports PayPal). >> [...] >&g

Re: Python package to accept payments in Internet

2017-05-03 Thread Victor Porton
Steve D'Aprano wrote: > On Wed, 3 May 2017 02:19 am, Victor Porton wrote: > >> I have created a full featured package to accept payments in Internet >> (currently supports PayPal). > [...] >> Buy the commercial version and support scientific research and a

Re: Python package to accept payments in Internet

2017-05-02 Thread Steve D'Aprano
On Wed, 3 May 2017 02:19 am, Victor Porton wrote: > I have created a full featured package to accept payments in Internet > (currently supports PayPal). [...] > Buy the commercial version and support scientific research and a new > principle of the Web I am working on. What lic

Python package to accept payments in Internet

2017-05-02 Thread Victor Porton
I have created a full featured package to accept payments in Internet (currently supports PayPal). It has especially great support for recurring payments. Here it is: http://freesoft.portonvictor.org/django-debits.xml I hope we with community work will turn it into an universal payment

Re: Internet Data Handling » mailbox

2016-10-24 Thread Adam Jensen
On 10/22/2016 11:56 PM, Jason Friedman wrote: >> >> for message in mailbox.mbox(sys.argv[1]): >> if message.has_key("From") and message.has_key("To"): >> addrs = message.get_all("From") >> addrs.extend(message.get_all("To")) >> for addr in add

Re: Internet Data Handling » mailbox

2016-10-23 Thread Jon Ribbens
On 2016-10-23, Jason Friedman wrote: >> >> for message in mailbox.mbox(sys.argv[1]): >> if message.has_key("From") and message.has_key("To"): >> addrs = message.get_all("From") >> addrs.extend(message.get_all("To")) >> for addr in addrs: >>

Re: Internet Data Handling » mailbox

2016-10-23 Thread Jon Ribbens
On 2016-10-23, Jon Ribbens wrote: > On 2016-10-23, Jason Friedman wrote: >>> >>> for message in mailbox.mbox(sys.argv[1]): >>> if message.has_key("From") and message.has_key("To"): >>> addrs = message.get_all("From") >>> addrs.extend(message.get_all("To"))

Re: Internet Data Handling » mailbox

2016-10-23 Thread Jason Friedman
> > for message in mailbox.mbox(sys.argv[1]): > if message.has_key("From") and message.has_key("To"): > addrs = message.get_all("From") > addrs.extend(message.get_all("To")) > for addr in addrs: > addrl = addr.lower() >

Re: Internet Data Handling » mailbox

2016-10-23 Thread andy
Sat, 22 Oct 2016 19:41:45 -0400 wrote Adam Jensen: > On 10/22/2016 05:47 AM, andy wrote: >> I would type: help(mailbox) after importing it. > > I guess the output of that might be more meaningful once I understand > the underlying structures and conventions. yes - you are right. fortunatelly pyt

Re: Internet Data Handling » mailbox

2016-10-22 Thread Adam Jensen
On 10/21/2016 11:22 PM, MRAB wrote: > The docs say that it's subclass of the email.message module's Message. > > You can get the email's header fields like it's a dict, except that the > field names are case-insensitive. The author(s) of the module couldn't > use a true dict because of the need fo

Re: Internet Data Handling » mailbox

2016-10-22 Thread Adam Jensen
On 10/22/2016 03:24 AM, dieter wrote: > In addition to the previous (excellent) responses: > > A "message" models a MIME (RFC1521 Multipurpose Internet Mail Extensions) > message (the international standard for the structure of emails). > The standard tells you that a mes

Re: Internet Data Handling » mailbox

2016-10-22 Thread Adam Jensen
On 10/22/2016 05:47 AM, andy wrote: > I would type: help(mailbox) after importing it. I guess the output of that might be more meaningful once I understand the underlying structures and conventions. -- https://mail.python.org/mailman/listinfo/python-list

Re: Internet Data Handling » mailbox

2016-10-22 Thread Adam Jensen
On 10/21/2016 11:45 PM, Ben Finney wrote: > So each instance you're getting has (a superset of) the API of > ``email.message.Message``, which is a lot of behaviour > https://docs.python.org/2.7/library/email.message.html#email.message.Message> > including being able to interrogate the message heade

Re: Internet Data Handling » mailbox

2016-10-22 Thread andy
Fri, 21 Oct 2016 22:43:55 -0400 wrote Adam Jensen: > The mailbox library documentation seems to be a little weak. In this > example: > > https://docs.python.org/2.7/library/mailbox.html#examples > > import mailbox for message in mailbox.mbox('~/mbox'): > subject = message['subject'] #

Re: Internet Data Handling » mailbox

2016-10-22 Thread dieter
n subject.lower(): > print subject > > What is the structure of "message"? I guess it's a dictionary but what > is its structure? What are the keys? In addition to the previous (excellent) responses: A "message" models a MIME (RFC1521 Multipurpose Interne

Re: Internet Data Handling » mailbox

2016-10-21 Thread Ben Finney
Adam Jensen writes: > import mailbox > for message in mailbox.mbox('~/mbox'): > subject = message['subject'] # Could possibly be None. > if subject and 'python' in subject.lower(): > print subject > > What is the structure of "message"? You're binding that name to each item

Re: Internet Data Handling » mailbox

2016-10-21 Thread MRAB
On 2016-10-22 03:43, Adam Jensen wrote: The mailbox library documentation seems to be a little weak. In this example: https://docs.python.org/2.7/library/mailbox.html#examples import mailbox for message in mailbox.mbox('~/mbox'): subject = message['subject'] # Could possibly be None.

  1   2   3   4   >