Re: [Tutor] Regarding licensing GPL terms

2007-01-31 Thread Kent Johnson
Kent Johnson wrote: > Anup Rao wrote: >> c> Also, does any python script that uses this module have to be >> distributed under GPL , LGPL, or is the PSF license sufficient? >> My preference would be the PSF but I am not sure if it is ok. > > The PSF itself discourages using the PSF license f

Re: [Tutor] Why this error ?

2007-01-31 Thread Eric Pais
Danny Yoo wrote: >>> I mean put all the parameters with quotes, I guess that might be a cause >>> of the error. >>> >>> conn = MySQLdb.connect ('host' = "localhost", 'user' = "testuser", >>> 'passwd'= "testpass", 'db' = "test") >>> >> No, unfortunately the problem remains, but thanks anyway.

Re: [Tutor] Regarding licensing GPL terms

2007-01-31 Thread Terry Carroll
On Wed, 31 Jan 2007, Anup Rao wrote: > Hi, > > I am writing an application that uses a python libary (a *.so file) > generated using SWIG. > This library makes direct system calls to the Linux kernel. The Linux kernel is not actually licensed under the standard GPL. The copy of the GPL Lin

Re: [Tutor] Why this error ?

2007-01-31 Thread Mário Gamito
Hi, > This will fail because you have quote marks around 'host', 'user', > etc. See the tutorial on keyword arguments.. Now i have: import MySQLdb conn = MySQLdb.connect(host = "localhost", user = "testuser", passwd = "testpass", db = "test") cursor = conn.cursor () cursor.execute ("SELECT VER

Re: [Tutor] Why this error ?

2007-01-31 Thread John Fouhy
On 01/02/07, Mário Gamito <[EMAIL PROTECTED]> wrote: > Ok, now i have: > > import MySQLdb > > conn = MySQLdb.connect('host' = "localhost", 'user' = "testuser", > 'passwd' = "testpass", 'db' = "test") > cursor = conn.cursor () > cursor.execute ("SELECT VERSION()") > row = cursor.fetchone () > print

Re: [Tutor] Why this error ?

2007-01-31 Thread Danny Yoo
>> I mean put all the parameters with quotes, I guess that might be a cause >> of the error. >> >> conn = MySQLdb.connect ('host' = "localhost", 'user' = "testuser", >> 'passwd'= "testpass", 'db' = "test") > No, unfortunately the problem remains, but thanks anyway. It's supposed to be without quo

Re: [Tutor] Why this error ?

2007-01-31 Thread Mário Gamito
Hi, > Your indentation is wrong. Try outdenting all your code so it all > starts in the same column, and see if that helps. Ok, now i have: import MySQLdb conn = MySQLdb.connect('host' = "localhost", 'user' = "testuser", 'passwd' = "testpass", 'db' = "test") cursor = conn.cursor () cursor.exec

Re: [Tutor] Why this error ?

2007-01-31 Thread Mário Gamito
Hi, Asrarahmed Kadri wrote: > could you try: > 'host'='localhost' > > I mean put all the parameters with quotes, I guess that might be a cause > of the error. > > conn = MySQLdb.connect ('host' = "localhost", 'user' = "testuser", > 'passwd'= "testpass", 'db' = "test") No, unfortunately the pr

Re: [Tutor] Why this error ?

2007-01-31 Thread John Fouhy
On 01/02/07, Mário Gamito <[EMAIL PROTECTED]> wrote: > import MySQLdb > > conn = MySQLdb.connect (host = "localhost", user = "testuser", > passwd = "testpass", db = "test") > cursor = conn.cursor () > cursor.execute ("SELECT VERSION()") > row = cursor.fetchone () > print "server

[Tutor] Why this error ?

2007-01-31 Thread Mário Gamito
Hi, I have this code: import MySQLdb conn = MySQLdb.connect (host = "localhost", user = "testuser", passwd = "testpass", db = "test") cursor = conn.cursor () cursor.execute ("SELECT VERSION()") row = cursor.fetchone () print "server version:", row[0] cursor.close ()

Re: [Tutor] local daynames in unicode

2007-01-31 Thread frank h.
hm I guess I found an answer myself on windows, the default encoding is not 'utf8' thus, if I use encoding = locale.getlocale()[1] t.decode(encoding) instead of t.decode('utf8') it works On 1/31/07, frank h. <[EMAIL PROTECTED]> wrote: Hello all, using python 2.4.4, I have the following ses

[Tutor] Is there anyone running planetplanet (coded in Python) ?

2007-01-31 Thread Mário Gamito
Hi, I'm running planetplanet and i'd like to add archiving and pagination to the software. I intend to use MySQL to store the feeds information and already installed python-MySQLdb. I'm not much of a Python programmer. My problem is that i can't see very well where are the variable that hold

[Tutor] Is there anyone running planetplanet (coded in Python) ?

2007-01-31 Thread Mário Gamito
Hi, I'm running planetplanet and i'd like to add archiving and pagination to the software. I intend to use MySQL to store the feeds information and already installed python-MySQLdb. I'm not much of a Python programmer. My problem is that i can't see very well where are the variables that hold

Re: [Tutor] Is there anyone running planetplanet (coded in Python) ?

2007-01-31 Thread Mário Gamito
Hi Kent, > You will probably do better asking this on the planet developer list: > http://lists.planetplanet.org/mailman/listinfo/devel Already did. No reply. Regards, Mário Gamito ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/l

[Tutor] local daynames in unicode

2007-01-31 Thread frank h.
Hello all, using python 2.4.4, I have the following session on Mac OS X: import datetime, locale locale.setlocale(locale.LC_ALL, 'se_SE') t=datetime.date(2007,01,29).strftime("%A") t 'M?\xa5ndag' type(t) t.decode('utf8') u'M\xe5ndag' fantastic! I just got the unicode version of the swedish name

Re: [Tutor] Is there anyone running planetplanet (coded in Python) ?

2007-01-31 Thread Kent Johnson
Mário Gamito wrote: > Hi, > > I'm running planetplanet and i'd like to add archiving and pagination to > the software. You will probably do better asking this on the planet developer list: http://lists.planetplanet.org/mailman/listinfo/devel Kent ___

[Tutor] Is there anyone running planetplanet (coded in Python) ?

2007-01-31 Thread Mário Gamito
Hi, I'm running planetplanet and i'd like to add archiving and pagination to the software. I intend to use MySQL to store the feeds information and already installed python-MySQLdb. I'm not much of a Python programmer. My problem is that i can't see very well where are the variables that hold

Re: [Tutor] Generating all possible hits of a regex pattern

2007-01-31 Thread Kent Johnson
Barton David wrote: > I don't suppose there's a nifty trick (exploiting the internal workings > of the re module perhaps) to generate all possible hits of a given regex > pattern? > > Something like: > >> >> import re >> >> mypattern=re.compile( "[AB]C{1,2}D?" ) >> >> print list( all_pattern_

[Tutor] Generating all possible hits of a regex pattern

2007-01-31 Thread Barton David
I don't suppose there's a nifty trick (exploiting the internal workings of the re module perhaps) to generate all possible hits of a given regex pattern? Something like: >>> import re >>> mypattern=re.compile( "[AB]C{1,2}D?" ) >>> print list( all_pattern_generator( mypattern ) ) ["AC","BC","ACC

[Tutor] youtube & yelp

2007-01-31 Thread OkaMthembo
Hi folks, im of the beaten path here, but does anyone know what frameworks YouTube and Yelp use? i know/ read that they use python. Thankee "shortash" -- "The Stupidry Foundry" ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/li

Re: [Tutor] Regarding licensing GPL terms

2007-01-31 Thread Andrew Ball
Cool! Do you know about rpath/conary? It may not be worth tons here, but it is good for custom Linux distributions. http://www.rpath.com/corp/ On 1/31/07, Anup Rao <[EMAIL PROTECTED]> wrote: Hi Andrew, A minor correction in the URL it is *http://sarovar.org/projects/pylinux/* Sorry for

Re: [Tutor] Regarding licensing GPL terms

2007-01-31 Thread Kent Johnson
Anup Rao wrote: > > Hi, > > I am writing an application that uses a python libary (a *.so file) > generated using SWIG. > This library makes direct system calls to the Linux kernel. > This raises three questions. > > a> Does this mean that the library must be distributed under GPL terms? I d

[Tutor] Fwd: Regarding licensing GPL terms

2007-01-31 Thread Andrew Ball
Forwarding this to the list in case it didn't make it there earlier. If you're doing this for work or school, please contact any IP lawyers your organization with your questions. Nonetheless, this information and the link from Michael Lange should help. Excellent book: http://www.amazon.com/Op

Re: [Tutor] Regarding licensing GPL terms

2007-01-31 Thread Michael Lange
On Wed, 31 Jan 2007 13:34:24 +0530 Anup Rao <[EMAIL PROTECTED]> wrote: > Hi, > > I am writing an application that uses a python libary (a *.so file) > generated using SWIG. > This library makes direct system calls to the Linux kernel. > This raises three questions. > > a> Does this mean that

[Tutor] Regarding licensing GPL terms

2007-01-31 Thread Anup Rao
Hi, I am writing an application that uses a python libary (a *.so file) generated using SWIG. This library makes direct system calls to the Linux kernel. This raises three questions. a> Does this mean that the library must be distributed under GPL terms? b> Can I distribute it as LGPL? c> A