[Tutor] Question regarding win32com getting ldap object

2009-01-05 Thread vishwajeet singh
Hi List, I am running following code to get ldap com object but the result I am getting is unknown I am using Python 25 and win32 bindings available at http://downloads.sourceforge.net/pywin32/pywin32-212.win32-py2.2.exe?modtime=1217535908&big_mirror=0 *adsi = win32com.client.Dispatch('ADsNameSpa

Re: [Tutor] RE Silliness

2009-01-05 Thread bob gailer
Omer wrote: Bob, I tried your way. >>> import re >>> urlMask = r"http://[\w\Q./\?=\R]+()?" >>> text=u"Not working examplehttp://this.is.a/url?header=nullAnd another linehttp://and.another.url"; >>> re.findall(urlMask,text) [u'', u''] Oops I failed to notice you were using findall. Kent expl

Re: [Tutor] extreme basics

2009-01-05 Thread A.T.Hofkamp
Mr Gerard Kelly wrote: This is extremely weird, I think. Here is a tiny program: from math import * from Numeric import * x=[0]*10 for counter in rangelen((x)): x[counter]=counter*0.1 print x Here is what I get: [0.0, 0.10001, 0.20001, 0.30004, 0.

[Tutor] Usage of for loop

2009-01-05 Thread vanam
Hi all, i am beginner to this python language and slowing learning the language by referring docs.I am trying to understand the for loop i.e., usage of for loop in python,unlike c where i can give condition in python it is simple iterating over sequence. I am trying tounderstand the below lines of

Re: [Tutor] RE Silliness

2009-01-05 Thread Omer
Bob, I tried your way. >>> import re >>> urlMask = r"http://[\w\Q./\?=\R]+()?" >>> text=u"Not working examplehttp://this.is.a/url?header=nullAnd another linehttp://and.another.url"; >>> re.findall(urlMask,text) [u'', u''] spir, I did understand it. What I'm not understanding is why isn't this wor

Re: [Tutor] extreme basics

2009-01-05 Thread Alan Gauld
"Mr Gerard Kelly" wrote This is extremely weird, I think. No, its normal and you got the right reason its due to floating point binary representation issues. Here is a tiny program: from math import * from Numeric import * This is probably a bad idea here (in fact its usually a bad

Re: [Tutor] Wayne's waning list.

2009-01-05 Thread Alan Gauld
"WM." wrote As a BASIC, hobby programmer, (long since), I get so jargonized here that I seldom ask about anything any more. Have you tried my tutorial, it compares VBScript (somewhat like BASIC) with Python. It might help. gleaned from reading many, many posts is the URL for projecteuler.

Re: [Tutor] RE Silliness

2009-01-05 Thread Kent Johnson
On Mon, Jan 5, 2009 at 11:16 AM, Omer wrote: > Bob, I tried your way. > import re urlMask = r"http://[\w\Q./\?=\R]+()?" text=u"Not working examplehttp://this.is.a/url?header=nullAnd another linehttp://and.another.url"; re.findall(urlMask,text) > [u'', u''] > > spir, I did

[Tutor] Wayne's waning list.

2009-01-05 Thread WM.
As a BASIC, hobby programmer, (long since), I get so jargonized here that I seldom ask about anything any more. The only useful bit I have gleaned from reading many, many posts is the URL for projecteuler. Maybe, after I get past the baby steps and start using the libraries, I will benefit mor

Re: [Tutor] Wayne's waning list.

2009-01-05 Thread spir
Le Mon, 05 Jan 2009 16:01:56 +0100, "A.T.Hofkamp" a écrit : > > (And if it is any comfort to you, it happens to me too. I have read several > discussions about the "@" operator, and still don't understand why you'd want > to have it. No doubt it is a fantastic operator with many uses, but > a

Re: [Tutor] Usage of for loop

2009-01-05 Thread A.T.Hofkamp
vanam wrote: Hi all, i am beginner to this python language and slowing learning the language by referring docs.I am trying to understand the for loop i.e., usage of for loop in python,unlike c where i can give condition in python it is simple In C, the for-loop is just a hidden 'while'. You can

Re: [Tutor] Usage of for loop

2009-01-05 Thread Sander Sweers
On Mon, Jan 5, 2009 at 14:19, vanam wrote: > I am trying tounderstand the below lines of code but of no avail. Python can loop over many types of sequences.. This can be a list, tuple or string and in your example a list. > a = ["cat", "window","defenestrate"] > for x in a: > print x, len(x

Re: [Tutor] Question regarding win32com getting ldap object

2009-01-05 Thread Jervis Whitley
On Mon, Jan 5, 2009 at 8:04 PM, vishwajeet singh wrote: > Hi List, > > I am running following code to get ldap com object but the result I am > getting is unknown > I am using Python 25 and win32 bindings available at > http://downloads.sourceforge.net/pywin32/pywin32-212.win32-py2.2.exe?modtime=1

Re: [Tutor] Wayne's waning list.

2009-01-05 Thread A.T.Hofkamp
WM. wrote: As a BASIC, hobby programmer, (long since), I get so jargonized here that I seldom ask about anything any more. The only useful bit I have gleaned from reading many, many posts is the URL for projecteuler. Maybe, after I get past the baby steps and start using the libraries, I will

Re: [Tutor] extreme basics

2009-01-05 Thread spir
Le Mon, 05 Jan 2009 17:59:06 +1000, Mr Gerard Kelly a écrit : > This is extremely weird, I think. > > Here is a tiny program: > > from math import * > from Numeric import * > > x=[0]*10 > > > for counter in rangelen((x)): > x[counter]=counter*0.1 > > print x > > Here is what I get: >

Re: [Tutor] Usage of for loop

2009-01-05 Thread jadrifter
On Mon, 2009-01-05 at 18:49 +0530, vanam wrote: > Hi all, > i am beginner to this python language and slowing learning the > language by referring docs.I am trying to understand the for loop > i.e., usage of for loop in python,unlike c where i can give condition > in python it is simple iterating o

[Tutor] Convert values in a list back and forth from ints and time

2009-01-05 Thread Sander Sweers
Hello Tutors, I use the csv module to read and write a csv file. When I read the file into a new list I convert the ints and the dates to int and time objects so I can do calculations. I use the below function which works. def convertValue(value, dateformat, reverse=False): if reverse:

Re: [Tutor] Convert values in a list back and forth from ints and time

2009-01-05 Thread bob gailer
Sander Sweers wrote: Hello Tutors, I use the csv module to read and write a csv file. When I read the file into a new list I convert the ints and the dates to int and time objects so I can do calculations. I use the below function which works. def convertValue(value, dateformat, reverse=False):

Re: [Tutor] Question regarding win32com getting ldap object

2009-01-05 Thread vishwajeet singh
Thanks for the help. It worked for me. On Tue, Jan 6, 2009 at 1:28 AM, Jervis Whitley wrote: > > > On Mon, Jan 5, 2009 at 8:04 PM, vishwajeet singh wrote: > >> Hi List, >> >> I am running following code to get ldap com object but the result I am >> getting is unknown >> I am using Python 25 and