Re: [Tutor] Validating String contains IP address

2017-04-01 Thread Mats Wichmann
On 03/31/2017 06:44 PM, Alex Kleider wrote: > On 2017-03-31 16:35, Ed Manning wrote: >> What's the best way to validate a string contains a IP address >> Sent from my iPad >> ___ >> Tutor maillist - Tutor@python.org >> To unsubscribe or change subscript

Re: [Tutor] Validating String contains IP address

2017-04-01 Thread Alex Kleider
On 2017-03-31 18:01, Mats Wichmann wrote: On 03/31/2017 06:44 PM, Alex Kleider wrote: On 2017-03-31 16:35, Ed Manning wrote: What's the best way to validate a string contains a IP address Sent from my iPad ___ Tutor maillist - Tutor@python.org To un

Re: [Tutor] Validating String contains IP address

2017-04-01 Thread Alan Gauld via Tutor
On 01/04/17 17:29, Alex Kleider wrote: > Good point! I hadn't considered IPV6 and didn't know about the ipaddress > module. Me too, on both counts. Actually I should have known about ipaddress because this question has come up before but I'd forgotten... :-( And as for forgetting IP6 - as an ex

Re: [Tutor] Function question

2017-04-01 Thread Peter O'Doherty
Many thanks! On 25-03-17 11:17, Alan Gauld via Tutor wrote: On 25/03/17 10:01, Peter O'Doherty wrote: def myFunc(num): for i in range(num): print(i) print(myFunc(4)) 0 1 2 3 None #why None here? Because your function does not have an explicit return value so Python returns it

Re: [Tutor] Function question

2017-04-01 Thread Peter O'Doherty
On 25-03-17 11:17, Alan Gauld via Tutor wrote: method: print(' '.join(anotherFunction(4)) Many thanks! ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] python gtk serial loop thread readind data close

2017-04-01 Thread Cameron Simpson
On 30Mar2017 12:40, Alexandru Achim wrote: Dear users, I had a problem regarding Threads in python and Gtk3. I want to stop a while loop in Gtk , a loop starded with a thread. I want to control a delay timer laser board with give me ,when I send a command by serial connection, give back contin