"Neha Dhupia IN WATER" "Neha Dhupia" IN BIKINI " "SEXY "Neha Dhupia SEXY BELLY" "Neha Dhupia IN YELLOW BIKINI" "Neha Dhupia IN WHITE BIKINI" "Neha Dhupia" AS MISS WORLD" "BOLLYWOOD BIKINI" on http://

2010-05-28 Thread Naeem
"Neha Dhupia IN WATER" "Neha Dhupia" IN BIKINI " "SEXY "Neha Dhupia SEXY BELLY" "Neha Dhupia IN YELLOW BIKINI" "Neha Dhupia IN WHITE BIKINI" "Neha Dhupia" AS MISS WORLD" "BOLLYWOOD BIKINI" on http://hollywood-bollywood-pics.blogspot.com/ "Neha Dhupia IN WATER" "Neha Dhupia" IN BIKINI " "SE

Re: Free chapter about Python and databases (MySQL and SQLite)

2010-05-28 Thread Robinow
wrote: Sebastian Bassi writes: On Fri, May 28, 2010 at 12:37 AM, John Bokma wrote: Even if it's just a few bucks, it's still money saved [0]. On top of that I think it's way better to point your audience to good books on the topic and skip the intro instead of doing a (half hearted

Re: Free chapter about Python and databases (MySQL and SQLite)

2010-05-28 Thread John Bokma
Sebastian Bassi writes: > On Fri, May 28, 2010 at 12:37 AM, John Bokma wrote: >> I feel more than uncomfortable with example code that uses: user="root" > > What's wrong with this? It is just an example of connection string. > The reader will use his/her user/pass/dbname according to their own >

Re: function that counts...

2010-05-28 Thread Lie Ryan
On 05/26/10 11:04, Bryan wrote: > Jean-Michel Pichavant wrote: >> I still don't see "how many positive integers less than n have digits >> that sum up to m" makes it a "partition" though if that what prttn >> means. Surely because I miss the context. > > A partition of a positive integer m is an u

Re: multiprocessing and accessing server's stdout

2010-05-28 Thread Martin P. Hellwig
On 05/28/10 21:44, Adam Tauno Williams wrote: On Fri, 2010-05-28 at 15:41 +0100, Martin P. Hellwig wrote: On 05/28/10 13:17, Adam Tauno Williams wrote: You should be able to point it any any file-like object. But, again, why? If you have the data in the process why send it to stdout and redir

Re: TypeError: _new_() takes exactly 3 arguments (2 given) - what does it mean?

2010-05-28 Thread Jesse McDonnell
On Wed, 26 May 2010 14:30:21 -0400 Terry Reedy wrote: > On 5/24/2010 2:52 PM, Jesse McDonnell wrote: > > I'm attempting to install Powerline http://code.google.com/p/powerline/, > > a computer reservation software based on CherryPy/Python using a MYSql > > database, at my local library and I've r

A Friday Python Programming Pearl: random sampling

2010-05-28 Thread Mark Dickinson
For a lazy Friday evening, here's a Python algorithm that seemed so cute that I just had to share it with everyone. I'm sure it's well known to many here, but it was new to me. Skip directly to the 'sample2' function to see the algorithm and avoid the commentary... Suppose that you want to selec

Re: multiprocessing and accessing server's stdout

2010-05-28 Thread Adam Tauno Williams
On Fri, 2010-05-28 at 15:41 +0100, Martin P. Hellwig wrote: > On 05/28/10 13:17, Adam Tauno Williams wrote: > > > You should be able to point it any any file-like object. But, again, > > why? > > If you have the data in the process why send it to stdout and redirect > > it. Why not just send the

Re: Omit the headers from XML message

2010-05-28 Thread kak...@gmail.com
On May 28, 7:48 pm, Peter Otten <__pete...@web.de> wrote: > Jon Clements wrote: > > On 28 May, 16:24, "kak...@gmail.com" wrote: > >> Hi i have the following xml message i want to omit the headers, any > >> hints? > > Assuming the header is separated by a blank line, something like: > > > list(isli

Re: Like __getattr__ but with args and kwargs as well

2010-05-28 Thread MRAB
Giampaolo Rodolà wrote: I know, the title doesn't say much, but I had no better ideas. =) I have a class within a serie of redundant methods, which looks like this: class MixedAuthorizer: def __init__(self, *args): # expected a list of class instances self.authorizers = args

Re: Like __getattr__ but with args and kwargs as well

2010-05-28 Thread Giampaolo Rodolà
2010/5/28 Peter Otten <__pete...@web.de>: > Giampaolo Rodolà wrote: > >> I know, the title doesn't say much, but I had no better ideas. =) >> I have a class within a serie of redundant methods, which looks like this: >> >> class MixedAuthorizer: >> >>     def __init__(self, *args): >>         # exp

Re: if, continuation and indentation

2010-05-28 Thread Colin J. Williams
On 28-May-10 05:54 AM, Jonathan Hartley wrote: On May 27, 1:57 pm, Jean-Michel Pichavant wrote: HH wrote: I have a question about best practices when it comes to line wrapping/ continuation and indentation, specifically in the case of an if statement. When I write an if statement with many c

Re: Like __getattr__ but with args and kwargs as well

2010-05-28 Thread Peter Otten
Giampaolo Rodolà wrote: > I know, the title doesn't say much, but I had no better ideas. =) > I have a class within a serie of redundant methods, which looks like this: > > class MixedAuthorizer: > > def __init__(self, *args): > # expected a list of class instances > self.aut

Re: Like __getattr__ but with args and kwargs as well

2010-05-28 Thread Miki
>         method = getattr(auths[0], method_name, None) Should be fn = getattr(auths[0], method_name, None) -- http://mail.python.org/mailman/listinfo/python-list

Re: Like __getattr__ but with args and kwargs as well

2010-05-28 Thread Chris Rebert
On Fri, May 28, 2010 at 10:08 AM, Giampaolo Rodolà wrote: > I know, the title doesn't say much, but I had no better ideas. =) > I have a class within a serie of redundant methods, which looks like this: > > class MixedAuthorizer: > >    def __init__(self, *args): >        # expected a list of clas

Re: Like __getattr__ but with args and kwargs as well

2010-05-28 Thread Miki
class MixedAuthorizer: def __init__(self, *args): # expected a list of class instances self.authorizers = args self._set_methods() def _set_methods(self): for attr in ("home", "password"): def fn(user): return self._get_attr(user,

Like __getattr__ but with args and kwargs as well

2010-05-28 Thread Giampaolo Rodolà
I know, the title doesn't say much, but I had no better ideas. =) I have a class within a serie of redundant methods, which looks like this: class MixedAuthorizer: def __init__(self, *args): # expected a list of class instances self.authorizers = args def get_home(self, u

Re: ElementTree write creates large one line XML file ....

2010-05-28 Thread robert somerville
Thanks Robert Kern : "prettyprint" ; indent() does the trick ;-) >ElementTree writes exactly what you tell it to. In XML, whitespace is >significant. If you want newlines and/or indentation to make it pretty-looking, >then you need to add those to your elements. > >Fredrik provides an example f

Re: Omit the headers from XML message

2010-05-28 Thread Peter Otten
Jon Clements wrote: > On 28 May, 16:24, "kak...@gmail.com" wrote: >> Hi i have the following xml message i want to omit the headers, any >> hints? > Assuming the header is separated by a blank line, something like: > > list(islice(dropwhile(bool, s.split('\n')), 1, None)) Making the same assum

Re: Omit the headers from XML message

2010-05-28 Thread Stefan Behnel
kak...@gmail.com, 28.05.2010 17:24: Hi i have the following xml message i want to omit the headers, any hints? POST /test/pcp/Listener HTTP/1.1 User-Agent: Jakarta Commons-HttpClient/3.1 Host: 127.0.0.1:50002 Content-Length: 547 http://demo.com/demo";> scvdcvsdv

Re: Omit the headers from XML message

2010-05-28 Thread kak...@gmail.com
On 28 Μάϊος, 18:45, Jon Clements wrote: > On 28 May, 16:24, "kak...@gmail.com" wrote: > > > > > > > Hi i have the following xml message i want to omit the headers, any > > hints? > > > POST /test/pcp/Listener HTTP/1.1 > > User-Agent: Jakarta Commons-HttpClient/3.1 > > Host: 127.0.0.1:50002 > > Co

Re: Some More MySQL

2010-05-28 Thread MRAB
Victor Subervi wrote: I still have this code: sql = 'select * from options%s where ID=%%s', (opTable[0].upper() + opTable[1:]) cursor.execute(sql, (id,)) which throws this error: /var/www/html/angrynates.com/cart/enterOptionsPrices2.py

Re: Free chapter about Python and databases (MySQL and SQLite)

2010-05-28 Thread Peter Otten
christian schulze wrote: > On 28 Mai, 17:12, Sebastian Bassi wrote: >> On Fri, May 28, 2010 at 9:41 AM, Tino Wildenhain >> wrote: >> > Did you consider adding a part dealing with postgresql too? >> > (Especially interesting in the way you can write stored functions >> > in python there) >> >> Th

Re: Omit the headers from XML message

2010-05-28 Thread Jon Clements
On 28 May, 16:24, "kak...@gmail.com" wrote: > Hi i have the following xml message i want to omit the headers, any > hints? > > POST /test/pcp/Listener HTTP/1.1 > User-Agent: Jakarta Commons-HttpClient/3.1 > Host: 127.0.0.1:50002 > Content-Length: 547 > > http://demo.com/demo";> >   >     >      

Re: Yet Another MySQL Problem

2010-05-28 Thread Malcolm Greene
Tim, > The underscore is a valid variable-name, idiomatically used for "I don't care > about this", often seen in places like tuple assignment: The underscore is also used as an alias for gettext.gettext or gettext.ugettext so you may want to use another variable-name. Malcolm -- http://mail.p

Re: Some More MySQL

2010-05-28 Thread Victor Subervi
I still have this code: sql = 'select * from options%s where ID=%%s', (opTable[0].upper() + opTable[1:]) cursor.execute(sql, (id,)) which throws this error: /var/www/html/angrynates.com/cart/enterOptionsPrices2.py 70 print 'All options prices have been successfully updated.'

Re: http post

2010-05-28 Thread yqyq22
On May 28, 5:24 pm, christian schulze wrote: > On 28 Mai, 17:20, yqyq22 wrote: > > > > > > > On May 28, 5:17 pm, christian schulze wrote: > > > > On 28 Mai, 16:47, yqyq22 wrote: > > > > > Hy, i would like to create a little script to reproduce this one > > > > below: > > > > Do you have suggest

Re: http post

2010-05-28 Thread christian schulze
On 28 Mai, 17:20, yqyq22 wrote: > On May 28, 5:17 pm, christian schulze wrote: > > > > > On 28 Mai, 16:47, yqyq22 wrote: > > > > Hy, i would like to create a little script to reproduce this one > > > below: > > > Do you have suggestion? > > > > POST /folder/path/upload.exe?/dir HTTP/1.1 > > > Ho

Omit the headers from XML message

2010-05-28 Thread kak...@gmail.com
Hi i have the following xml message i want to omit the headers, any hints? POST /test/pcp/Listener HTTP/1.1 User-Agent: Jakarta Commons-HttpClient/3.1 Host: 127.0.0.1:50002 Content-Length: 547 http://demo.com/demo";> scvdcvsdv sdfv Antonis Kaklis awa

Re: Free chapter about Python and databases (MySQL and SQLite)

2010-05-28 Thread christian schulze
On 28 Mai, 17:12, Sebastian Bassi wrote: > On Fri, May 28, 2010 at 9:41 AM, Tino Wildenhain wrote: > > Did you consider adding a part dealing with postgresql too? > > (Especially interesting in the way you can write stored functions > > in python there) > > That is a good idea for the next versio

Re: http post

2010-05-28 Thread yqyq22
On May 28, 5:17 pm, christian schulze wrote: > On 28 Mai, 16:47, yqyq22 wrote: > > > > > > > Hy, i would like to create a little script to reproduce this one > > below: > > Do you have suggestion? > > > POST /folder/path/upload.exe?/dir HTTP/1.1 > > Host: 192.168.100.1:8080 > > User-Agent: Mozill

Re: http post

2010-05-28 Thread christian schulze
On 28 Mai, 16:47, yqyq22 wrote: > Hy, i would like to create a little script to reproduce this one > below: > Do you have suggestion? > > POST /folder/path/upload.exe?/dir HTTP/1.1 > Host: 192.168.100.1:8080 > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: > 1.9.2.3) Gecko/2010040

Re: Free chapter about Python and databases (MySQL and SQLite)

2010-05-28 Thread Sebastian Bassi
On Fri, May 28, 2010 at 9:41 AM, Tino Wildenhain wrote: > Did you consider adding a part dealing with postgresql too? > (Especially interesting in the way you can write stored functions > in python there) That is a good idea for the next version/edition. But meanwhile I could write something in m

Re: Minor annoyances with properties

2010-05-28 Thread eb303
On May 28, 11:50 am, Christian Heimes wrote: > Am 28.05.2010 11:31, schrieb eb303: > > > > > On May 27, 3:24 pm, Christian Heimes wrote: > >>>  Do I miss something? > >>> Is this the way to do it, or is there a better one? > > >> A better way was introduced in Python 2.6. > >> Seehttp://docs.pyt

Re: multiprocessing and accessing server's stdout

2010-05-28 Thread Martin P. Hellwig
On 05/28/10 13:17, Adam Tauno Williams wrote: You should be able to point it any any file-like object. But, again, why? If you have the data in the process why send it to stdout and redirect it. Why not just send the data to the client directly? Well you might want to multiplex it to more

Re: Free chapter about Python and databases (MySQL and SQLite)

2010-05-28 Thread Tino Wildenhain
Hi, Am 28.05.2010 04:45, schrieb Sebastian Bassi: Hello, I want to announce that the publisher of "Python for Bioinformatis" (CRC Press) allowed me to publish a chapter from my book. I decided to publish the chapter about "Python and databases". I think it may be useful for somebody. The officia

Re: Some More MySQL

2010-05-28 Thread Kushal Kumaran
On Fri, May 28, 2010 at 5:46 PM, Victor Subervi wrote: > On Fri, May 28, 2010 at 2:17 AM, Dennis Lee Bieber > wrote: >> >> On Thu, 27 May 2010 23:22:24 +0100, MRAB >> declaimed the following in gmane.comp.python.general: >> >> > >> > Placeholders which are handled by .execute shouldn't be wrappe

Re: Sockets and xml problem

2010-05-28 Thread kak...@gmail.com
On May 28, 3:23 pm, Stefan Behnel wrote: > kak...@gmail.com, 28.05.2010 13:50: > > > Hi in the following code > > > class MyClientHandler(SocketServer.BaseRequestHandler): > >      def handle(self): > >          print self.client_address, now( ) > >          time.sleep(5) > >          while True:

Re: Sockets and xml problem

2010-05-28 Thread Stefan Behnel
kak...@gmail.com, 28.05.2010 13:50: Hi in the following code class MyClientHandler(SocketServer.BaseRequestHandler): def handle(self): print self.client_address, now( ) time.sleep(5) while True: xmltxt = self.request.recv(1024)<--is this ok - enough?

Re: multiprocessing and accessing server's stdout

2010-05-28 Thread Adam Tauno Williams
On Thu, 2010-05-27 at 08:36 -0700, Tim Arnold wrote: > On May 26, 4:52 pm, Adam Tauno Williams > wrote: > > On Wed, 2010-05-26 at 11:47 -0700, Tim Arnold wrote: > > > Hi, > > > I'm using multiprocessing's BaseManager to create a server on one > > > machine and a client on another. The client fires

Re: Some More MySQL

2010-05-28 Thread Victor Subervi
On Fri, May 28, 2010 at 2:17 AM, Dennis Lee Bieber wrote: > On Thu, 27 May 2010 23:22:24 +0100, MRAB > declaimed the following in gmane.comp.python.general: > > > > > Placeholders which are handled by .execute shouldn't be wrapped in > > quotes, even is the value is a string, because .execute wil

Re: Yet Another MySQL Problem

2010-05-28 Thread Victor Subervi
On Thu, May 27, 2010 at 5:47 PM, Tim Chase wrote: > On 05/27/2010 03:32 PM, Victor Subervi wrote: > > On Thu, May 27, 2010 at 1:15 PM, Tim Chase wrote: >> >>> That should be: ', '.join(['%s'] * len(values))) >>> >>> Or as I've done in the past: >>> >>> ', '.join('%s' for _

Sockets and xml problem

2010-05-28 Thread kak...@gmail.com
Hi in the following code class MyClientHandler(SocketServer.BaseRequestHandler): def handle(self): print self.client_address, now( ) time.sleep(5) while True: xmltxt = self.request.recv(1024)<--is this ok - enough? if not xmltxt: break

Re: if, continuation and indentation

2010-05-28 Thread Jonathan Hartley
On 28/05/2010 11:34, Jean-Michel Pichavant wrote: Jonathan Hartley wrote: On May 27, 1:57 pm, Jean-Michel Pichavant wrote: HH wrote: I have a question about best practices when it comes to line wrapping/ continuation and indentation, specifically in the case of an if statement. When I w

Re: if, continuation and indentation

2010-05-28 Thread Jean-Michel Pichavant
Jonathan Hartley wrote: On May 27, 1:57 pm, Jean-Michel Pichavant wrote: HH wrote: I have a question about best practices when it comes to line wrapping/ continuation and indentation, specifically in the case of an if statement. When I write an if statement with many conditions,

Re: if, continuation and indentation

2010-05-28 Thread Jonathan Hartley
On May 27, 1:57 pm, Jean-Michel Pichavant wrote: > HH wrote: > > I have a question about best practices when it comes to line wrapping/ > > continuation and indentation, specifically in the case of an if > > statement. > > > When I write an if statement with many conditions, I prefer to use a > >

Re: Minor annoyances with properties

2010-05-28 Thread Christian Heimes
Am 28.05.2010 11:31, schrieb eb303: > On May 27, 3:24 pm, Christian Heimes wrote: >>> Do I miss something? >>> Is this the way to do it, or is there a better one? >> >> A better way was introduced in Python 2.6. >> Seehttp://docs.python.org/library/functions.html?highlight=property#prop... >> I

Re: Minor annoyances with properties

2010-05-28 Thread eb303
On May 27, 3:14 pm, Neil Cerutti wrote: > On 2010-05-27, eb303 wrote: > > > I've been using Python properties quite a lot lately and I've > > found a few things that are a bit annoying about them in some > > cases. I wondered if I missed something or if anybody else has > > this kind of problems

Re: Minor annoyances with properties

2010-05-28 Thread eb303
On May 27, 8:56 pm, Francesco Bochicchio wrote: > On 27 Mag, 14:37, eb303 wrote: > > > > > Hello all, > > > I've been using Python properties quite a lot lately and I've found a > > few things that are a bit annoying about them in some cases. I > > wondered if I missed something or if anybody els

Re: Minor annoyances with properties

2010-05-28 Thread eb303
On May 27, 3:24 pm, Christian Heimes wrote: > >  Do I miss something? > > Is this the way to do it, or is there a better one? > > A better way was introduced in Python 2.6. > Seehttp://docs.python.org/library/functions.html?highlight=property#prop... > I have a Python only version around if you a

"Hansika Motwani IN DENIM JEANS" "Hansika Motwani BEAUTIFUL BELLY" "Hansika Motwani as college GIRL" "Hansika Motwani in GYM in RED BRA" "Hansika Motwani in GREEN SAREE BELLY" "BOLLYWOOD GIRLS" on h

2010-05-28 Thread Naeem
"Hansika Motwani IN DENIM JEANS" "Hansika Motwani BEAUTIFUL BELLY" "Hansika Motwani as college GIRL" "Hansika Motwani in GYM in RED BRA" "Hansika Motwani in GREEN SAREE BELLY" "BOLLYWOOD GIRLS" on http://hollywood-bollywood-pics.blogspot.com "Hansika Motwani IN DENIM JEANS" "Hansika Motwani BEA