Re: [Tutor] regex question

2012-04-05 Thread Peter Otten
Khalid Al-Ghamdi wrote: > I'm trying to extract the domain in the following string. Why doesn't my > pattern (patt) work: > redata > 'Tue Jan 14 00:43:21 2020::eax...@gstwyysnbd.gov::1578951801-6-10 Sat Jul > 31 15:17:39 1993::rz...@wgxvhx.com::744121059-5-6 Mon Sep 21 20:22:37 > 1987::ttw..

[Tutor] Is socket.socket() a func or a class

2012-04-05 Thread Khalid Al-Ghamdi
hi all, I'm reading this book that says when creating a socket you have to use the socket.socket() *function *as in : ss=socket.socket() but whey i check they type it says it's a class which makes sense cause you're creating a socket object. >>> type(ss) so, which is it? or do authors loosely

Re: [Tutor] Running scripts at login

2012-04-05 Thread Michael Lewis
> > > >>> Hi everyone, > >>> > >>> I am researching how to automatically run some of my scripts after I > log > >>> into my Windows machine. I don't want to have to manually run the > script > >>> or setup a windows task. > >> The same way you run any Windows program on startup: > >> Add the script

[Tutor] regex question

2012-04-05 Thread Khalid Al-Ghamdi
hi all, I'm trying to extract the domain in the following string. Why doesn't my pattern (patt) work: >>> redata 'Tue Jan 14 00:43:21 2020::eax...@gstwyysnbd.gov::1578951801-6-10 Sat Jul 31 15:17:39 1993::rz...@wgxvhx.com::744121059-5-6 Mon Sep 21 20:22:37 1987::ttw...@rpybrct.edu::559243357-6-7

Re: [Tutor] Running scripts at login

2012-04-05 Thread Steven D'Aprano
Michael Lewis wrote: On 05/04/12 05:59, Michael Lewis wrote: Hi everyone, I am researching how to automatically run some of my scripts after I log into my Windows machine. I don't want to have to manually run the script or setup a windows task. The same way you run any Windows program on star

Re: [Tutor] Running scripts at login

2012-04-05 Thread Dave Angel
On 04/05/2012 10:07 PM, Michael Lewis wrote: >> >> On 05/04/12 05:59, Michael Lewis wrote: >>> Hi everyone, >>> >>> I am researching how to automatically run some of my scripts after I log >>> into my Windows machine. I don't want to have to manually run the script >>> or setup a windows task. >> T

Re: [Tutor] Running scripts at login

2012-04-05 Thread Michael Lewis
> > > On 05/04/12 05:59, Michael Lewis wrote: > > Hi everyone, > > > > I am researching how to automatically run some of my scripts after I log > > into my Windows machine. I don't want to have to manually run the script > > or setup a windows task. > > The same way you run any Windows program on s

Re: [Tutor] How is the return statement working in this function?

2012-04-05 Thread Brian van den Broek
On 6 Apr 2012 02:43, "Greg Christian" wrote: > > I am just wondering if anyone can explain how the return statement in this function is working (the code is from activestate.com)? Where does x come from – it is not initialized anywhere else and then just appears in the return statement. Any help w

Re: [Tutor] How is the return statement working in this function?

2012-04-05 Thread Steven D'Aprano
Greg Christian wrote: I am just wondering if anyone can explain how the return statement in this function is working (the code is from activestate.com)? Where does x come from – it is not initialized anywhere else and then just appears in the return statement. Any help would be appreciated. re

Re: [Tutor] How is the return statement working in this function?

2012-04-05 Thread Dave Angel
On 04/05/2012 08:39 PM, Greg Christian wrote: > I am just wondering if anyone can explain how the return statement in this > function is working (the code is from activestate.com)? Where does x come > from – it is not initialized anywhere else and then just appears in the > return statement. Any

[Tutor] How is the return statement working in this function?

2012-04-05 Thread Greg Christian
I am just wondering if anyone can explain how the return statement in this function is working (the code is from activestate.com)? Where does x come from – it is not initialized anywhere else and then just appears in the return statement. Any help would be appreciated. def primes(n): """Pr

Re: [Tutor] __class__.__name__ for literal integer causes SyntaxError

2012-04-05 Thread Dave Angel
On 04/04/2012 10:27 PM, Emile van Sebille wrote: > On 4/4/2012 6:27 PM Tim Johnson said... >> See the following console session: > 4.6.__class__.__name__ > > The first decimal is considered to be part of the float literal here... > > >> 'float' > 6.__class__.__name__ > > ... _and_ here... >

Re: [Tutor] Running scripts at login

2012-04-05 Thread Alan Gauld
On 05/04/12 05:59, Michael Lewis wrote: Hi everyone, I am researching how to automatically run some of my scripts after I log into my Windows machine. I don't want to have to manually run the script or setup a windows task. The same way you run any Windows program on startup: Add the script to

Re: [Tutor] group txt files by month

2012-04-05 Thread Peter Otten
questions anon wrote: > I have been able to write up what I want to do (using glob) but I am not > sure how to loop it or simplify it to make the script more efficient. > I am currently: > -grouping the same months in a year using glob > -opening the files in a group and combining the data using a