Re: so if zodb has no index or search, how run fast query?

2013-05-16 Thread dieter
visphatesj...@gmail.com writes: > ... The only service of the ZODB is storing (persistent) objects persistently and providing (almost) transparent acces to them. Persistent objects have a (usually) implicitely managed attribute which contains the object's "object id" and the ZODB can (quite) effici

Re: Fwd: Fwd: Python for philosophers

2013-05-16 Thread llanitedave
On Thursday, May 16, 2013 5:28:11 AM UTC-7, Citizen Kant wrote: > On May 16, 5:55 am, Citizen Kant wrote: > If someone's interested on thinking outside the box with me for the sake of helping me, that would be great and highly appreciated. Sorry, but you're asking for more than just thinking o

Re: Python C-API: how to define nested classes?

2013-05-16 Thread Stefan Behnel
Serge WEINSTOCK, 16.05.2013 10:55: > I'm currently writing a C extension module for python using the "raw" C-API. > I would like to be able to define "nested classes" like in the following > python code > > > class A: > class B: >

Re: How to write fast into a file in python?

2013-05-16 Thread lokeshkoppaka
On Friday, May 17, 2013 8:50:26 AM UTC+5:30, lokesh...@gmail.com wrote: > I need to write numbers into a file upto 50mb and it should be fast > > can any one help me how to do that? > > i had written the following code.. > > ---

Re: How to write fast into a file in python?

2013-05-16 Thread Steven D'Aprano
On Thu, 16 May 2013 20:20:26 -0700, lokeshkoppaka wrote: > I need to write numbers into a file upto 50mb and it should be fast can > any one help me how to do that? > i had written the following code.. > -- > def create_file_numbe

How to write fast into a file in python?

2013-05-16 Thread lokeshkoppaka
I need to write numbers into a file upto 50mb and it should be fast can any one help me how to do that? i had written the following code.. --- def create_file_numbers_old(filename, size): start

Re: any cherypy powred sites I can check out?

2013-05-16 Thread alex23
On May 17, 10:00 am, visphatesj...@gmail.com wrote: > is a cherrypy list accessible here on web thru google groups? Is an apology for your offensive response to Chris Angelico forthcoming? -- http://mail.python.org/mailman/listinfo/python-list

Re: so if zodb has no index or search, how run fast query?

2013-05-16 Thread alex23
On May 17, 4:14 am, visphatesj...@gmail.com wrote: > how? > > and what package provides such? https://pypi.python.org/pypi/zope.index https://pypi.python.org/pypi/zope.app.catalog I can see how those would be pretty difficult to find... -- http://mail.python.org/mailman/listinfo/python-list

Re: any cherypy powred sites I can check out?

2013-05-16 Thread visphatesjava
fuck straight off -- http://mail.python.org/mailman/listinfo/python-list

Re: any cherypy powred sites I can check out?

2013-05-16 Thread visphatesjava
is a cherrypy list accessible here on web thru google groups? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to use relative Import

2013-05-16 Thread Steven D'Aprano
On Fri, 17 May 2013 01:35:49 +0530, Chitrank Dixit wrote: > I want to know how relative imports are different than import. I have > found lots of examples on internet explaining about the relative import > but I want to know about the basic aspects of relative import that make > it different than

Re: python 2.7 vs 2.5

2013-05-16 Thread inq1ltd
On Thursday, May 16, 2013 07:17:57 PM Jean-Michel Pichavant wrote: > - Original Message - > > >I am using python 2.7 to write > > > > the cgi file and my web server is using python 2.5. > > The answer lies in your question. > > JM > I appreciate the response, However, My question was

Re: Python C-API: how to define nested classes?

2013-05-16 Thread 88888 Dihedral
Serge WEINSTOCK於 2013年5月16日星期四UTC+8下午4時55分07秒寫道: > Hi, > >   > > I'm currently writing a C extension module for python using the "raw" C-API. > I would like to be able to define "nested classes" like in the following > python code > >   > >

Re: Number of cells, using CSV module

2013-05-16 Thread tunacubes
Thank you Skip, worked great. And thank you Tim for Tidying things up! -- http://mail.python.org/mailman/listinfo/python-list

How to use relative Import

2013-05-16 Thread Chitrank Dixit
Hello Python developers I want to know how relative imports are different than import. I have found lots of examples on internet explaining about the relative import but I want to know about the basic aspects of relative import that make it different than import. *Regards * *Chitrank Dixit * *I

Re: Number of cells, using CSV module

2013-05-16 Thread Tim Chase
On 2013-05-16 14:08, Skip Montanaro wrote: > > So rather than > >>a > >>b > >>c > >>d > >>e > >>f > > I would get [a, b, c, d, e, f] > > all_items = [] > for row in reader: > all_items.append(row[0]) And following up here, this could be tidily rewritten as all_items = [row[0] for row in re

Re: Number of cells, using CSV module

2013-05-16 Thread Tim Chase
On 2013-05-16 14:07, Skip Montanaro wrote: > > len(reader) gives me an error. > > Apologies. len(list(reader)) should work. Of course, you'll wind > up loading the entire CSV file into memory. You might want to just > count row-by-row: > > n = 0 > for row in reader: > n += 1 which can nic

Re: any cherypy powred sites I can check out?

2013-05-16 Thread Skip Montanaro
On Thu, May 16, 2013 at 1:17 PM, wrote: > anyone? Perhaps asking this question (or a more precise one) on a CherryPy mailing list would elicit more (helpful) responses. If you just repeat the above though, I'm afraid most of the answers will just be, "yes." Hint: Read through this before aski

Re: any cherypy powred sites I can check out?

2013-05-16 Thread Walter Hurry
On Thu, 16 May 2013 11:17:37 -0700, visphatesjava wrote: > anyone? Questions asked in that fashion stand little chance of eliciting helpful responses. -- http://mail.python.org/mailman/listinfo/python-list

Re: Number of cells, using CSV module

2013-05-16 Thread Skip Montanaro
> So rather than >>a >>b >>c >>d >>e >>f > I would get [a, b, c, d, e, f] all_items = [] for row in reader: all_items.append(row[0]) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Number of cells, using CSV module

2013-05-16 Thread Skip Montanaro
> len(reader) gives me an error. Apologies. len(list(reader)) should work. Of course, you'll wind up loading the entire CSV file into memory. You might want to just count row-by-row: n = 0 for row in reader: n += 1 Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Number of cells, using CSV module

2013-05-16 Thread tunacubes
I guess another way to accomplish this would be, is there any way that I can turn the returned value for (column) into 1 list? So rather than >a >b >c >d >e >f I would get [a, b, c, d, e, f] -- http://mail.python.org/mailman/listinfo/python-list

Re: Number of cells, using CSV module

2013-05-16 Thread tunacubes
On Thursday, May 16, 2013 2:40:08 PM UTC-4, Skip Montanaro wrote: > Perhaps you want len(reader) instead?  Or a counter which increments for > every row read which has an item in column A? > > > > Skip len(reader) gives me an error. I tried a counter, but unfortunately due to the simplicity

Re: any cherypy powred sites I can check out?

2013-05-16 Thread Chris Angelico
On Fri, May 17, 2013 at 4:17 AM, wrote: > anyone? > -- > http://mail.python.org/mailman/listinfo/python-list You're firing off a bunch of minimal-content threads that ask other people to do work for you. I recommend you put a bit more thought into your posts, and show that you're willing to do a

Re: Number of cells, using CSV module

2013-05-16 Thread Skip Montanaro
Perhaps you want len(reader) instead? Or a counter which increments for every row read which has an item in column A? Skip -- http://mail.python.org/mailman/listinfo/python-list

Number of cells, using CSV module

2013-05-16 Thread tunacubes
I'm using the csv module to get information from a csv file. I have items listed in Column A. I want to know how many items are listed in Column A. import csv with open('test.csv', 'r') as f: reader = csv.reader(f) for column in reader: column = (column[0]) print(column)

any cherypy powred sites I can check out?

2013-05-16 Thread visphatesjava
anyone? -- http://mail.python.org/mailman/listinfo/python-list

wil anyone ressurect medusa and pypersist?

2013-05-16 Thread visphatesjava
www.prevayler.org in python = pypersist medusa = python epoll web server and ftp server eventy and async -- http://mail.python.org/mailman/listinfo/python-list

so if zodb has no index or search, how run fast query?

2013-05-16 Thread visphatesjava
how? and what package provides such? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for philosophers

2013-05-16 Thread Tim Daneliuk
On 05/16/2013 09:27 AM, Grant Edwards wrote: On 2013-05-16, Tim Daneliuk wrote: On 05/15/2013 08:01 PM, Ned Batchelder wrote: On 5/11/2013 4:03 PM, Citizen Kant wrote: Don't get me wrong. I can see the big picture and the amazing things that programmers write on Python, it's just that my que

Re: Fractal

2013-05-16 Thread Ian Kelly
On Thu, May 16, 2013 at 10:55 AM, Sharon COUKA wrote: > # Register events > c.bind('i', zoom) > c.bind('i', unzoom) > c.bind('i', mouseMove) I'm not an expert at Tkinter so maybe one of the other residents can help you better with that. The code above looks wrong to me, though. As far as I know,

Re: python 2.7 vs 2.5

2013-05-16 Thread Jean-Michel Pichavant
- Original Message - >I am using python 2.7 to write > the cgi file and my web server is using python 2.5. The answer lies in your question. JM -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the inten

Re: Fractal

2013-05-16 Thread Ian Kelly
On Thu, May 16, 2013 at 5:04 AM, Sharon COUKA wrote: > I have to write the script, and i have one but the zoom does not work That doesn't answer my question. Perhaps if you would share with us what you already have, then we could point out what you need to do and where to get your "zoom" working

Re: spilt question

2013-05-16 Thread Dave Angel
On 05/16/2013 11:15 AM, Chris Angelico wrote: On Fri, May 17, 2013 at 1:00 AM, loial wrote: I want to split a string so that I always return everything BEFORE the LAST underscore HELLO_.lst # should return HELLO HELLO_GOODBYE_.ls # should return HELLO_GOODBYE I have

Re: spilt question

2013-05-16 Thread Ned Batchelder
On 5/16/2013 11:00 AM, loial wrote: I want to split a string so that I always return everything BEFORE the LAST underscore HELLO_.lst # should return HELLO HELLO_GOODBYE_.ls # should return HELLO_GOODBYE I have tried with rsplit but cannot get it to work. Any help app

Re: spilt question

2013-05-16 Thread Tim Chase
On 2013-05-16 08:00, loial wrote: > I want to split a string so that I always return everything BEFORE > the LAST underscore > > HELLO_.lst # should return HELLO > HELLO_GOODBYE_.ls # should return HELLO_GOODBYE > > I have tried with rsplit but cannot get it to work. .r

Re: spilt question

2013-05-16 Thread Chris Angelico
On Fri, May 17, 2013 at 1:00 AM, loial wrote: > I want to split a string so that I always return everything BEFORE the LAST > underscore > > HELLO_.lst # should return HELLO > HELLO_GOODBYE_.ls # should return HELLO_GOODBYE > > I have tried with rsplit but cannot get it t

Re: spilt question

2013-05-16 Thread Dave Angel
On 05/16/2013 11:00 AM, loial wrote: I want to split a string so that I always return everything BEFORE the LAST underscore HELLO_.lst # should return HELLO HELLO_GOODBYE_.ls # should return HELLO_GOODBYE I have tried with rsplit but cannot get it to work. Any help ap

Re: spilt question

2013-05-16 Thread Walter Hurry
On Thu, 16 May 2013 08:00:25 -0700, loial wrote: > I want to split a string so that I always return everything BEFORE the > LAST underscore > > HELLO_.lst # should return HELLO > HELLO_GOODBYE_.ls # should return HELLO_GOODBYE > > I have tried with rsplit but cannot get

Re: Software epigrams

2013-05-16 Thread Chris Angelico
On Fri, May 17, 2013 at 1:06 AM, rusi wrote: > On May 16, 7:37 pm, Chris Angelico wrote: >> On Fri, May 17, 2013 at 12:23 AM, Neil Cerutti wrote: >> > When I tried to pin down what an irrelevant detail in a computer >> > program could be, I couldn't do it. I guess comment decorations, >> > maybe

Re: spilt question

2013-05-16 Thread Fábio Santos
str.split takes a limit argument. Try your_string.split('_', 1) On 16 May 2013 16:11, "loial" wrote: > I want to split a string so that I always return everything BEFORE the > LAST underscore > > HELLO_.lst # should return HELLO > HELLO_GOODBYE_.ls # should return HELLO_G

Re: Software epigrams

2013-05-16 Thread rusi
On May 16, 7:37 pm, Chris Angelico wrote: > On Fri, May 17, 2013 at 12:23 AM, Neil Cerutti wrote: > > On 2013-05-16, F?bio Santos wrote: > >> And in Java we have factories, builders and builderfactories. > >> What's so relevant about them? Java is high level, no? > > > When I tried to pin down w

spilt question

2013-05-16 Thread loial
I want to split a string so that I always return everything BEFORE the LAST underscore HELLO_.lst # should return HELLO HELLO_GOODBYE_.ls # should return HELLO_GOODBYE I have tried with rsplit but cannot get it to work. Any help appreciated -- http://mail.python.org/m

Re: executing python scripts that are symlinked

2013-05-16 Thread Dave Angel
On 05/16/2013 04:29 AM, Charles Smith wrote: On 16 Mai, 10:18, Dave Angel wrote: On 05/16/2013 03:48 AM, Charles Smith wrote: Hi. How can I say, from the cmd line, that python should take my CWD as my CWD, and not the directory where the script actually is? I have a python script that w

Re: [Off topic] Software epigrams

2013-05-16 Thread Chris Angelico
On Fri, May 17, 2013 at 12:23 AM, Neil Cerutti wrote: > On 2013-05-16, F?bio Santos wrote: >> And in Java we have factories, builders and builderfactories. >> What's so relevant about them? Java is high level, no? > > When I tried to pin down what an irrelevant detail in a computer > program coul

Re: Python for philosophers

2013-05-16 Thread Grant Edwards
On 2013-05-16, Tim Daneliuk wrote: > On 05/15/2013 08:01 PM, Ned Batchelder wrote: >> On 5/11/2013 4:03 PM, Citizen Kant wrote: >>> Don't get me wrong. I can see the big picture and the amazing things that >>> programmers write on Python, it's just that my question points to the >>> lowest level

Re: Python for philosophers

2013-05-16 Thread Schneider
Maybe the implementation of the Python Interpreter could be seen as transition function. This can be understand in detail, but it even if you know how the interpreter works, you don't really know to work _with_ the interpreter. Even more, there are a lot of decisions, which are made 'by design'

Re: [Off topic] Software epigrams

2013-05-16 Thread Neil Cerutti
On 2013-05-16, F?bio Santos wrote: >> If I want to bake bread I hope I don't have to till a garden, >> plant the wheat, harvest the wheat, and grind the wheat. But >> gardening is relevant to bread baking weather or not I do it. > > Then memory management t is relevant to every python program > ev

Re: Fwd: Fwd: Fwd: Python for philosophers

2013-05-16 Thread Chris Angelico
On Thu, May 16, 2013 at 11:46 PM, rusi wrote: > IOW a programmer is one who quickly and easily comes to the nub/core/ > kernel/essence of a problem and as easily and adroitly shaves off the > irrelevant. +1. This is a fairly good description of a programmer's job. Of course, that's the theoretic

Re: Fwd: Fwd: Fwd: Python for philosophers

2013-05-16 Thread rusi
On May 16, 5:28 pm, Citizen Kant wrote: > > I'm just an honest and polite guy asking you guys a couple of simple out of > the box questions that are important for me. Everyone here has the freedom > to keep on with their own assumptions and beliefs. If someone's interested > on thinking outside th

Fwd: Fwd: Fwd: Python for philosophers

2013-05-16 Thread Citizen Kant
On May 16, 5:55 am, Citizen Kant wrote: > As a matter of > class, the word python names first a python snake than a Monty Python, > which is 50% inspired by that python word, word that's been being > considered the given name of a particular kind of snake since times in > which Terry Gilliam wasn'

PyDev 2.7.4 Released

2013-05-16 Thread Fabio Zadrozny
Hi All, PyDev 2.7.4 has been released Details on PyDev: http://pydev.org Details on its development: http://pydev.blogspot.com Release Highlights: --- * Improved Jython scripting startup time (so, the editor should start up faster). * PyDev no longer causing JSP pro

Re: Python 2.7.x - problem with obejct.__init__() not accepting *args and **kwargs

2013-05-16 Thread Oscar Benjamin
On 16 May 2013 03:06, Steven D'Aprano wrote: > On Wed, 15 May 2013 13:16:09 +0100, Oscar Benjamin wrote: > > >> I don't generally use super() > > Then you should, especially in Python 3. > > If you're not using super in single-inheritance classes, then you're > merely making your own code harder t

Re: executing python scripts that are symlinked

2013-05-16 Thread Charles Smith
On 16 Mai, 11:04, Steven D'Aprano wrote: > Python does use your current working directory as your current working > directory. I think you are misdiagnosing the problem. That's usually how it ends up ... > > Here's a demonstration: > > steve@runes:~$ cat test.py > import os > print os.getcwd(

Re: executing python scripts that are symlinked

2013-05-16 Thread Steven D'Aprano
On Thu, 16 May 2013 00:48:45 -0700, Charles Smith wrote: > Hi. > > How can I say, from the cmd line, that python should take my CWD as my > CWD, and not the directory where the script actually is? *scratches head* Python does use your current working directory as your current working directory

Python C-API: how to define nested classes?

2013-05-16 Thread Serge WEINSTOCK
Hi, I'm currently writing a C extension module for python using the "raw" C-API. I would like to be able to define "nested classes" like in the following python code class A: class B: def __init__(self): self.i

Re: executing python scripts that are symlinked

2013-05-16 Thread Charles Smith
On 16 Mai, 10:18, Dave Angel wrote: > On 05/16/2013 03:48 AM, Charles Smith wrote: > > > Hi. > > > How can I say, from the cmd line, that python should take my CWD as my > > CWD, and not the directory where the script actually is? > > > I have a python script that works fine when it sits in direct

Re: executing python scripts that are symlinked

2013-05-16 Thread Dave Angel
On 05/16/2013 03:48 AM, Charles Smith wrote: Hi. How can I say, from the cmd line, that python should take my CWD as my CWD, and not the directory where the script actually is? I have a python script that works fine when it sits in directory WC, but if I move it out of WC to H and put a symlin

Re: executing python scripts that are symlinked

2013-05-16 Thread Andrew Berg
On 2013.05.16 02:48, Charles Smith wrote: > Hi. > > How can I say, from the cmd line, that python should take my CWD as my > CWD, and not the directory where the script actually is? > > > I have a python script that works fine when it sits in directory WC, > but if I move it out of WC to H and p

EuroPython 2014/2015 Conference Team - Call for Proposals

2013-05-16 Thread M.-A. Lemburg
The EuroPython Society (EPS) is happy to announce the Call for Proposals for the EuroPython Conference in 2014 and 2015. This Call for Proposals is meant to collect proposals from teams that volunteer for organizing the EuroPython conference in 2014-2015. The Call for Proposals document containin

executing python scripts that are symlinked

2013-05-16 Thread Charles Smith
Hi. How can I say, from the cmd line, that python should take my CWD as my CWD, and not the directory where the script actually is? I have a python script that works fine when it sits in directory WC, but if I move it out of WC to H and put a symlink from H/script to WC, it doesn't find the pack

Re: Determine actually given command line arguments

2013-05-16 Thread Henry Leyh
On 16.05.2013 08:08, Jussi Piitulainen wrote: Henry Leyh writes: But now I would also like to be able to _write_ such a config file FILE that can be read in a later run. And FILE should contain only those arguments that were given on the command line. Say, I tell argparse to look for argument

Re: Fractal

2013-05-16 Thread Chris Angelico
On Thu, May 16, 2013 at 5:11 PM, Ulrich Eckhardt wrote: > Am 16.05.2013 02:00, schrieb alex23: > >> My favourite is this one: >> >> http://preshing.com/20110926/high-resolution-mandelbrot-in-obfuscated-python > > > Not only is this blog entry an interesting piece of art, there's other > interestin

Re: Fractal

2013-05-16 Thread Ulrich Eckhardt
Am 16.05.2013 02:00, schrieb alex23: My favourite is this one: http://preshing.com/20110926/high-resolution-mandelbrot-in-obfuscated-python Not only is this blog entry an interesting piece of art, there's other interesting things to read there, too. Thanks! Uli -- http://mail.python.org/m