[Tutor] checking if regex in pattern

2012-11-11 Thread Norman Khine
hello, i have this code >>> import re >>> import BeautifulSoup >>> matcher = re.compile(r"""Origine >>> :<\/strong><\/label>(.*)<\/p>""") >>> mystring = """ Les garanties >>> : >>> Les garanties : >>> >>> Origine : Burkina Faso, Cercle des Sécheurs >>> Origin

[Tutor] Connecting to a DB via a function call

2012-11-11 Thread Khalid Al-Ghamdi
Hi, Why is it that the following even though I call the below function? And how do I write a function that makes connection that I can use to query my DB? Traceback (most recent call last): File "C:/Python33/My Stuff/schedule_machine/schedule_machine01.py", line 19, in cur.execute('INSERT

Re: [Tutor] Connecting to a DB via a function call

2012-11-11 Thread Norman Khine
hi On Sun, Nov 11, 2012 at 11:39 AM, Khalid Al-Ghamdi wrote: > Hi, > > Why is it that the following even though I call the below function? And how > do I write a function that makes connection that I can use to query my DB? > > Traceback (most recent call last): > File "C:/Python33/My Stuff/sch

Re: [Tutor] checking if regex in pattern

2012-11-11 Thread Norman Khine
ok, i think i have it On Sun, Nov 11, 2012 at 10:48 AM, Norman Khine wrote: > hello, > > i have this code > import re import BeautifulSoup matcher = re.compile(r"""Origine :<\/strong><\/label>(.*)<\/p>""") mystring = """ Les garanties : >>> /> Les garanties >>

Re: [Tutor] Connecting to a DB via a function call

2012-11-11 Thread Dave Angel
On 11/11/2012 06:39 AM, Khalid Al-Ghamdi wrote: > Hi, > > Why is it that the following even though I call the below function? And how > do I write a function that makes connection that I can use to query my DB? > > Traceback (most recent call last): > File "C:/Python33/My Stuff/schedule_machine/s

Re: [Tutor] Connecting to a DB via a function call

2012-11-11 Thread Alan Gauld
On 11/11/12 11:39, Khalid Al-Ghamdi wrote: Hi, Why is it that the following even though I call the below function? And how do I write a function that makes connection that I can use to query my DB? The code and error don't align so it would help if we could see the actual code that generated