Re: whats wrong with this

2008-01-07 Thread Fredrik Lundh
mpho raborife wrote: > I'm trying to rum gmmtrain within my pthon program like this: > > Input -l List -t inittype -e traintype > -m mixture -d dimension -v vfloor -n number -p percent -r results -c cycle) > > But i keep on getting an error. it helps if you include the actual error message in

Re: fastest method to choose a random element

2008-01-07 Thread Paddy
On Jan 5, 6:37 am, Paddy <[EMAIL PROTECTED]> wrote: > On Jan 4, 7:55 pm, [EMAIL PROTECTED] wrote: > > > > > Hello, > > This is a question for the best method (in terms of performance > > only) to choose a random element from a list among those that satisfy > > a certain property. > > > This i

python-list@python.org

2008-01-07 Thread Paddy
On Jan 7, 1:09 am, John Nagle <[EMAIL PROTECTED]> wrote: >Another in our ongoing series on "Parsing Real-World HTML". > >It's wrong, of course. But Firefox will accept as HTML escapes > > & > > > < > > as well as the correct forms > > & > > >

Re: Patches to Python 2.5.1

2008-01-07 Thread Stefan Behnel
Brad wrote: > I was just looking through the 2.5.1 source code. I noticed a few > mis-spellings in the comments. No big deal really. Can patches be > submitted that correct the spelling errors or should they just be > pointed out to some mailing list? Funny you ask, if there were so few, you could

Multiple Bullets

2008-01-07 Thread katie smith
In my game there are planes and I could make multiple bullets fired by the plane by keeping track of each bullets x and y coordinates. I was wondering if there is an easier way without keeping track of a 150 bullet coordinates.

do - loop

2008-01-07 Thread Hita Vora
I have a dataset which has about 3000 subjects in it. I take each subject and perform 3 to 4 geoprocessing tasks on it. Currently I have a model where I manually feed in each subject's ID and then the rest of the process is automated. I would like to automate the process such that it would

Re: do - loop

2008-01-07 Thread Jeroen Ruigrok van der Werven
-On [20080107 09:51], Hita Vora ([EMAIL PROTECTED]) wrote: >I have a dataset which has about 3000 subjects in it. I take each subject >and perform 3 to 4 geoprocessing tasks on it. Currently I have a model where >I manually feed in each subject's ID and then the rest of

Re: Noob question

2008-01-07 Thread rocco . rossi
On Jan 7, 12:09 am, GHZ <[EMAIL PROTECTED]> wrote: > Had the same issue. What you want is: reload() Thanks :) -- http://mail.python.org/mailman/listinfo/python-list

Re: do - loop

2008-01-07 Thread Ben Finney
Hita Vora <[EMAIL PROTECTED]> writes: > I have a dataset which has about 3000 subjects in it. I take each > subject and perform 3 to 4 geoprocessing tasks on it. Currently I > have a model where I manually feed in each subject's ID and then the > rest of the process is automated. I would like to a

Python setup not working on Windows XP

2008-01-07 Thread Gowri
Hello, I am new to Python and am trying to setup Apache to serve Python using mod_python. I'm using a Windows XP box. here is a list of steps i followed for the installation: 1. Installed Apache 2.2.6 2. Installed Python 2.5.1 3. Installed mod_python 3.3.1 I then included the line LoadModule pyt

python syntax

2008-01-07 Thread mpho raborife
Please help me get this syntax right: os.system("HCopy -T 1 -C" 'os.path.join(conf_dir, "/hcopy.conf")' "-S" 'os.path.join(list_dir, "hcopy_list.txt")') - Looking for last minute shopping deals? Find them fast with Yahoo! Search.-- http://mail.python.o

TIOBE declares Python as programming language of 2007!

2008-01-07 Thread monkeydance
See http://www.tiobe.com/index.htm?tiobe_index. Marc -- http://mail.python.org/mailman/listinfo/python-list

Re: python syntax

2008-01-07 Thread Jeroen Ruigrok van der Werven
-On [20080107 11:46], mpho raborife ([EMAIL PROTECTED]) wrote: >os.system("HCopy -T 1 -C" 'os.path.join(conf_dir, "/hcopy.conf")' "-S" >'os.path.join(list_dir, "hcopy_list.txt")') I would guess you would want this: os.sys

Re: python syntax

2008-01-07 Thread Guilherme Polo
2008/1/7, mpho raborife <[EMAIL PROTECTED]>: > Please help me get this syntax right: > > os.system("HCopy -T 1 -C" 'os.path.join(conf_dir, "/hcopy.conf")' "-S" > 'os.path.join(list_dir, "hcopy_list.txt")') > import os import subprocess subprocess.Popen(["HCopy", "-T", "1", "-C", os.path.join(con

Re: fastest method to choose a random element

2008-01-07 Thread caca
> Just for fun, I profiled my answer versus the final answer... This mailing list is awesome! PS:ajaksu, I have to leave now, I hope bukzor's answer was enough to you (at least for the moment) -- http://mail.python.org/mailman/listinfo/python-list

Re: TIOBE declares Python as programming language of 2007!

2008-01-07 Thread Berco Beute
Cool! We knew it would happen one day :) What could be the reason? Python 3? Jython 2.2? Java's loss of sexiness? What I would like to know is what it was that boosted Python's popularity in 2004 (see http://www.tiobe.com/tiobe_index/Python.html). Equally interesting is the question why it dropped

Re: Delete lines containing a specific word

2008-01-07 Thread mik3l3374
On Jan 7, 1:21 am, Francesco Pietra <[EMAIL PROTECTED]> wrote: > Please, how to adapt the following script (to delete blank lines) to delete > lines containing a specific word, or words? > > f=open("output.pdb", "r") > for line in f: > line=line.rstrip() > if line: >

Re: Memory Leaks and Heapy

2008-01-07 Thread M.-A. Lemburg
On 2008-01-05 03:19, Yaakov Nemoy wrote: > On Jan 4, 2008 11:56 AM, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: >>> The most common answer I heard was possible fragmentation, meaning >>> there are no or few completely empty blocks to be found. If there are >>> no 'leaks' in the VM, then it's probably

Python's great, in a word

2008-01-07 Thread MartinRinehart
I'm a Java guy who's been doing Python for a month now and I'm convinced that 1) a multi-paradigm language is inherently better than a mono-paradigm language 2) Python writes like a talented figure skater skates. Would you Python old-timers try to agree on a word or two that completes: The best

Re: TIOBE declares Python as programming language of 2007!

2008-01-07 Thread Diez B. Roggisch
Berco Beute schrieb: > Cool! We knew it would happen one day :) > What could be the reason? Python 3? Jython 2.2? Java's loss of > sexiness? I'd say Java was never sexy, but dressed up in expensive lingerie by marketing maniacs... Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: python interfaces

2008-01-07 Thread Sion Arrowsmith
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >Sion Arrowsmith a écrit : >(snip rant about Java's "interfaces") > >Hem... Zope3's "interface" system is not exactly the same thing as >Java's one. Yeah, I was in need of letting off some steam in general and didn't pay enough attention that what I

Re: Python's great, in a word

2008-01-07 Thread Pablo Ziliani
[EMAIL PROTECTED] wrote: > Would you Python old-timers try to agree on a word or two that > completes: > > The best thing about Python is ___. Hi Martin, here is my top three: 1) Fun 2) Simplicity 3) Productivity -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's great, in a word

2008-01-07 Thread Neil Cerutti
On Jan 7, 2008 8:09 AM, <[EMAIL PROTECTED]> wrote: > I'm a Java guy who's been doing Python for a month now and I'm > convinced that > > 1) a multi-paradigm language is inherently better than a mono-paradigm > language > > 2) Python writes like a talented figure skater skates. > > Would you Python

Re: dictionary/hash and '1' versus 1

2008-01-07 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Paddy: >> Not really, it seems to me to be going the exact opposite way with >> languages with automatic type conversions being seen as not suited for >> larger programs. > > In Java you can add the number 1 to a string, and have it > automatically converted to string

How to refer to the current module?

2008-01-07 Thread Mike
I want to do something like the following (let's pretend that this is in file 'driver.py'): #!/bin/env python import sys def foo(): print 'foo' def bar(arg): print 'bar with %r' % arg def main(): getattr(driver, sys.argv[1])(*sys.argv[2:]) if __name__=='__main__': main() Ess

Re: Python's great, in a word

2008-01-07 Thread Dustan
On Jan 7, 7:09 am, [EMAIL PROTECTED] wrote: > I'm a Java guy who's been doing Python for a month now and I'm > convinced that > > 1) a multi-paradigm language is inherently better than a mono-paradigm > language > > 2) Python writes like a talented figure skater skates. > > Would you Python old-tim

I'm searching for Python style guidelines

2008-01-07 Thread MartinRinehart
There's a lot of dumb stuff out there. "Algorithms should be coded efficiently ..." Thanks, I'll keep that in mind. van Rossum's guidelines tend toward "pick something and stick to it" which is OK if you have enough experience to pick something Pythonic. I'm a relative newbie, not qualified to pic

Launching a wx GUI from within our python framework

2008-01-07 Thread bg_ie
Hi, At my work we have a framework writen in python which allows us to test our equipment. This framework is quite large and uses a Singelton called frameworkExec which we pass around between objects in order to share functionailty. For example, frameWorkExec stores an instance of the BatteryManag

Re: How to refer to the current module?

2008-01-07 Thread Guilherme Polo
2008/1/7, Mike <[EMAIL PROTECTED]>: > I want to do something like the following (let's pretend that this is > in file 'driver.py'): > > #!/bin/env python > > import sys > > def foo(): > print 'foo' > > def bar(arg): > print 'bar with %r' % arg > > def main(): > getattr(driver, sys.argv[

Re: Memory Leaks and Heapy

2008-01-07 Thread Yaakov Nemoy
On Jan 7, 2008 7:55 AM, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > Fair enough. Just wanted to give some more details as to > where to look for things that look like leaks, but are in > fact just results of internal feature of the Python > interpreter. We have a hackfest coming up in the Fedora Co

Re: python syntax

2008-01-07 Thread Guilherme Polo
2008/1/7, mpho raborife <[EMAIL PROTECTED]>: > Thanks. So could you please help me with this one: > subprocess.Popen(["gmmscore", "-i", Input, "-l", List, "-t", modeltype, > "-m", mixture, "-d", dimension, "-v", vfloor, "-n", number, "-r", results]) Only if you tell the problem. But I guess that y

Re: I'm searching for Python style guidelines

2008-01-07 Thread Guilherme Polo
2008/1/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > There's a lot of dumb stuff out there. "Algorithms should be coded > efficiently ..." Thanks, I'll keep that in mind. > > van Rossum's guidelines tend toward "pick something and stick to it" > which is OK if you have enough experience to pick somet

code doesn't reference immutables?

2008-01-07 Thread MartinRinehart
>From the manual: "code objects are immutable and contain no references (directly or indirectly) to mutable objects" (3.2) I thought my code worked with both mutable and immutable objects. Whassup? -- http://mail.python.org/mailman/listinfo/python-list

Re: I'm searching for Python style guidelines

2008-01-07 Thread Peter Otten
MartinRinehart wrote: > Anything written somewhere that's thorough? Any code body that should > serve as a reference? http://www.python.org/dev/peps/pep-0008/ -- http://mail.python.org/mailman/listinfo/python-list

dealing with binary files

2008-01-07 Thread Gerardo Herzig
Hi all. Im trying to read a binary data from an postgres WAL archive. If i make a xfile = open('filename', 'rb').xreadlines() line = xfile.next() i see this sort of thing: ']\xd0\x03\x00\x01\x00\x00\x00\r\x00\x00\x00\x00\x00\x00JM//DI+,D\x00\x00\x00\x01$\x00\x00\x00\x7f\x06\x00\x00y\r\t\x00\x02\x

Re: Python's great, in a word

2008-01-07 Thread alain
On Jan 7, 2:09 pm, [EMAIL PROTECTED] wrote: > I'm a Java guy who's been doing Python for a month now and I'm > convinced that > > 1) a multi-paradigm language is inherently better than a mono-paradigm > language > > 2) Python writes like a talented figure skater skates. > > Would you Python old-tim

Re: Launching a wx GUI from within our python framework

2008-01-07 Thread Guilherme Polo
2008/1/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Hi, > > At my work we have a framework writen in python which allows us to > test our equipment. This framework is quite large and uses a Singelton > called frameworkExec which we pass around between objects in order to > share functionailty. For e

Re: How to refer to the current module?

2008-01-07 Thread Mike
Sweet! Thanks! Mike On Jan 7, 8:30 am, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > > globals() =) > -- http://mail.python.org/mailman/listinfo/python-list

Re: code doesn't reference immutables?

2008-01-07 Thread Peter Otten
MartinRinehart wrote: > From the manual: > > "code objects are immutable and contain no references (directly or > indirectly) to mutable objects" (3.2) > > I thought my code worked with both mutable and immutable objects. > Whassup? A code object is an internal data structure that describes a p

Re: How to refer to the current module?

2008-01-07 Thread Jean-Paul Calderone
On Mon, 7 Jan 2008 05:21:42 -0800 (PST), Mike <[EMAIL PROTECTED]> wrote: >I want to do something like the following (let's pretend that this is >in file 'driver.py'): > >#!/bin/env python > >import sys > >def foo(): >print 'foo' > >def bar(arg): >print 'bar with %r' % arg > >def main(): >

Re: code doesn't reference immutables?

2008-01-07 Thread Guilherme Polo
2008/1/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > >From the manual: > > "code objects are immutable and contain no references (directly or > indirectly) to mutable objects" (3.2) > > I thought my code worked with both mutable and immutable objects. > Whassup? > What was your intention quoting thi

Re: dealing with binary files

2008-01-07 Thread Guilherme Polo
2008/1/7, Gerardo Herzig <[EMAIL PROTECTED]>: > Hi all. Im trying to read a binary data from an postgres WAL archive. > If i make a > xfile = open('filename', 'rb').xreadlines() > line = xfile.next() > > i see this sort of thing: > ']\xd0\x03\x00\x01\x00\x00\x00\r\x00\x00\x00\x00\x00\x00JM//DI+,D\x

python syntax

2008-01-07 Thread mpho raborife
I need help with the following: os.system("gmmscore"+"-i" + Input + "-l" + List + "-t" + str(modeltype) + "-m" + str(mixture) + "-d" + str(dimension) + "-v" + str(vfloor) + "-n" + str(number) + "-r" + results) - Never miss a thing. Make Yahoo your homepa

Re: Python's great, in a word

2008-01-07 Thread Tim Chase
> The best thing about Python is ___. + readable + productive + mind-fitting -tkc -- http://mail.python.org/mailman/listinfo/python-list

introspection question

2008-01-07 Thread Alex K
Hi Guys, What would be the simplest way of enumerating all methods and members (including inherited) of a given object? Thank you. Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: TIOBE declares Python as programming language of 2007!

2008-01-07 Thread Kay Schluehr
On Jan 7, 12:53 pm, Berco Beute <[EMAIL PROTECTED]> wrote: > Cool! We knew it would happen one day :) > What could be the reason? Python 3? Jython 2.2? Java's loss of > sexiness? Python eats Perls lunch as a scripting language. -- http://mail.python.org/mailman/listinfo/python-list

Re: dealing with binary files

2008-01-07 Thread Peter Otten
Gerardo Herzig wrote: > Hi all. Im trying to read a binary data from an postgres WAL archive. > If i make a > xfile = open('filename', 'rb').xreadlines() > line = xfile.next() > > i see this sort of thing: > ']\xd0\x03\x00\x01\x00\x00\x00\r\x00\x00\x00\x00\x00\x00JM//DI+,D\x00\x00\x00\x01$\x00\x

Re: introspection question

2008-01-07 Thread Peter Otten
Alex K wrote: > What would be the simplest way of enumerating all methods and members > (including inherited) of a given object? Thank you. inspect.getmembers() Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: introspection question

2008-01-07 Thread Alex K
Nice thank you. But anyway to make it look pretty? On 07/01/2008, Peter Otten <[EMAIL PROTECTED]> wrote: > Alex K wrote: > > > What would be the simplest way of enumerating all methods and members > > (including inherited) of a given object? Thank you. > > inspect.getmembers() > > Peter > -- > htt

Re: How to refer to the current module?

2008-01-07 Thread Christian Heimes
Mike wrote: > Is there any way around this? Can I somehow scope the 'current > module' and give getattr(...) an object that will (at run time) have > the appropriate bindings? globals() for the current name space import sys sys.modules[__name__] gets you the module object Christian -- http://

ctypes

2008-01-07 Thread hkimball
I am trying to call a funtinon in a third party dll that spawns another exe and I am using ctypes. Python does not complain at all but the other process does not get spawned. It appears that I am gaining access to the functions but with no results. Any ideas? Thanks in advance. >>> from ctypes

Re: dealing with binary files

2008-01-07 Thread Tom Brown
On Mon, 2008-01-07 at 11:57 -0200, Guilherme Polo wrote: > 2008/1/7, Gerardo Herzig <[EMAIL PROTECTED]>: > > Hi all. Im trying to read a binary data from an postgres WAL archive. > > If i make a > > xfile = open('filename', 'rb').xreadlines() > > line = xfile.next() > > > > i see this sort of thing

Re: introspection question

2008-01-07 Thread Guilherme Polo
2008/1/7, Alex K <[EMAIL PROTECTED]>: > Nice thank you. But anyway to make it look pretty? > pprint.pprint(inspect.getmembers(someobject)) > On 07/01/2008, Peter Otten <[EMAIL PROTECTED]> wrote: > > Alex K wrote: > > > > > What would be the simplest way of enumerating all methods and members > >

Re: introspection question

2008-01-07 Thread Peter Otten
Alex K wrote: Please don't top-post. > On 07/01/2008, Peter Otten <[EMAIL PROTECTED]> wrote: >> Alex K wrote: >> >> > What would be the simplest way of enumerating all methods and members >> > (including inherited) of a given object? Thank you. >> >> inspect.getmembers() > Nice thank you. But an

Re: dealing with binary files

2008-01-07 Thread Gerardo Herzig
Tom Brown wrote: >On Mon, 2008-01-07 at 11:57 -0200, Guilherme Polo wrote: > > >>2008/1/7, Gerardo Herzig <[EMAIL PROTECTED]>: >> >> >>>Hi all. Im trying to read a binary data from an postgres WAL archive. >>>If i make a >>>xfile = open('filename', 'rb').xreadlines() >>>line = xfile.next() >

Re: introspection question

2008-01-07 Thread Guilherme Polo
2008/1/7, Alex K <[EMAIL PROTECTED]>: > Hi Guys, > > What would be the simplest way of enumerating all methods and members > (including inherited) of a given object? Thank you. > > Alex > -- > http://mail.python.org/mailman/listinfo/python-list > import inspect inspect.getmembers(yourobject) --

PostgreSQL with Python

2008-01-07 Thread Sunil Ghai
I am looking for an E-Book or some tutorial in which a good explanation about PostgreSQL/MySQL database, then about interacting with them using Python is explained. I want to start RDBMS, i have no idea about them. I have been doing Python, willing to do some good project in RDBMS. Thanks in advanc

Re: I'm searching for Python style guidelines

2008-01-07 Thread MartinRinehart
Thank you both. Stupid me, went to Python.org and found Style Guidelines and thought that was the last word. Oh well. PEP 8 reminds me a lot of Sun's Java conventions, in ways I wish it didn't. The overall structure seems like a random list of topics and it omits a lot. For Java I went from Sun t

Re: list property fires get on append

2008-01-07 Thread Soviut
On Jan 6, 11:36 am, Carl Banks <[EMAIL PROTECTED]> wrote: > On Sun, 06 Jan 2008 00:31:13 -0800, Soviut wrote: > > I figured that an append would be treated as a set since I'm adding to > > the list. But what you say makes sense, although I can't say I'm happy > > with the behaviour. Is there any

Re: I'm searching for Python style guidelines

2008-01-07 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Here's just one of my questions: > > foo = [ > 'some item, quite long', > 'more items, all demanding there own line as they are not short', > ... > > Where would you put the closing ']'? on a line by itself, indented as your favourite Python editor indents

Re: I'm searching for Python style guidelines

2008-01-07 Thread Guilherme Polo
2008/1/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Thank you both. > > Stupid me, went to Python.org and found Style Guidelines and thought > that was the last word. Oh well. > > PEP 8 reminds me a lot of Sun's Java conventions, in ways I wish it > didn't. The overall structure seems like a random

Re: python syntax

2008-01-07 Thread Fredrik Lundh
mpho raborife wrote: > Please help me get this syntax right: > > os.system("HCopy -T 1 -C" 'os.path.join(conf_dir, "/hcopy.conf")' "-S" > 'os.path.join(list_dir, "hcopy_list.txt")') instead of attempting to get your program working by random trial and error process, maybe you should spend an

Re: Killing worker threads

2008-01-07 Thread kyosohma
On Jan 6, 7:48 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > tarun wrote: > > Can anyone help me with a simple code through which the main thread can > > kill the worker thread it started. > > it cannot. threads cannot be killed from the "outside". > > The only way to "kill" a thread is to have

Re: dictionary/hash and '1' versus 1

2008-01-07 Thread Sion Arrowsmith
<[EMAIL PROTECTED]> wrote: >In Java you can add the number 1 to a string, and have it >automatically converted to string before the string join... What do >you think of that feature? "-%s" % 1 -- \S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/ "Frankly I have no feelings towards pe

RE: dictionary/hash and '1' versus 1

2008-01-07 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Steven D'Aprano > Sent: Saturday, January 05, 2008 7:01 PM > To: python-list@python.org > Subject: Re: dictionary/hash and '1' versus 1 > > The problem with automatic conversions between strin

Re: Python's great, in a word

2008-01-07 Thread Martin Marcher
[EMAIL PROTECTED] wrote: > The best thing about Python is ___. it's pythonicness. -- http://noneisyours.marcher.name http://feeds.feedburner.com/NoneIsYours You are not free to read this message, by doing so, you have violated my licence and are required to urinate publicly. Thank you. --

Re: dictionary/hash and '1' versus 1

2008-01-07 Thread Paddy
On Jan 7, 5:09 pm, "Reedick, Andrew" <[EMAIL PROTECTED]> wrote: > Bingo. Perl has specific operators to establish intent: > > Perl -e "'1' + 1" > > 2 > > Perl -e "'1' . 1" > > 11 > '+' is the operator for addition > '.' is the operator for string concatenation > >

Re: Python's great, in a word

2008-01-07 Thread Henry Chang
What exactly does it mean "a bycycle for the mind"?? (assuming s/bycycle/bicycle) On Jan 7, 2008 5:41 AM, alain <[EMAIL PROTECTED]> wrote: > On Jan 7, 2:09pm, [EMAIL PROTECTED] wrote: > > I'm a Java guy who's been doing Python for a month now and I'm > > convinced that > > > > 1) a multi-paradigm

Re: Python's great, in a word

2008-01-07 Thread Paddy
On Jan 7, 1:09 pm, [EMAIL PROTECTED] wrote: > I'm a Java guy who's been doing Python for a month now and I'm > convinced that > > 1) a multi-paradigm language is inherently better than a mono-paradigm > language > > 2) Python writes like a talented figure skater skates. > > Would you Python old-tim

Re: TIOBE declares Python as programming language of 2007!

2008-01-07 Thread George Sakkis
On Jan 7, 9:27 am, Kay Schluehr <[EMAIL PROTECTED]> wrote: > On Jan 7, 12:53 pm, Berco Beute <[EMAIL PROTECTED]> wrote: > > > Cool! We knew it would happen one day :) > > What could be the reason? Python 3? Jython 2.2? Java's loss of > > sexiness? > > Python eats Perls lunch as a scripting languag

Re: I'm searching for Python style guidelines

2008-01-07 Thread MartinRinehart
Guilherme Polo wrote: > foo = [ > 'too long', > 'too long too', > ... > ] OK, I'll put it there too, and it will be easy for us to read each other's code (at least in this particular). -- http://mail.python.org/mailman/listinfo/python-list

Re: I'm searching for Python style guidelines

2008-01-07 Thread Paul McGuire
On Jan 7, 12:26 pm, [EMAIL PROTECTED] wrote: > Guilherme Polo wrote: > > foo = [ > >     'too long', > >     'too long too', > >     ... > >     ] > > OK, I'll put it there too, and it will be easy for us to read each > other's code (at least in this particular). While not required by any means, y

Does Python cache the startup module?

2008-01-07 Thread Baz Walter
Hello I remember reading somewhere (probably this list) that python may cache the module that starts a program (e.g. 'main.py'). I'm asking because I have found that this can sometimes cause problems when making small edits to the module. For instance, in my current module I changed the name of

Re: Python's great, in a word

2008-01-07 Thread George Sakkis
On Jan 7, 8:09 am, [EMAIL PROTECTED] wrote: > I'm a Java guy who's been doing Python for a month now and I'm > convinced that > > 1) a multi-paradigm language is inherently better than a mono-paradigm > language > > 2) Python writes like a talented figure skater skates. > > Would you Python old-ti

any() and all() shorthand

2008-01-07 Thread castironpi
any( iterab ) and all( iterab ) as shorthand for reduce( operator.or_, iterab ) and reduce( operator.and_, iterab ). What do you think? -- http://mail.python.org/mailman/listinfo/python-list

Re: any() and all() shorthand

2008-01-07 Thread Guilherme Polo
2008/1/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > any( iterab ) and all( iterab ) > > as shorthand for reduce( operator.or_, iterab ) and > reduce( operator.and_, iterab ). > > What do you think? > -- > http://mail.python.org/mailman/listinfo/python-list > You are too late, any and all are built-

Re: Does Python cache the startup module?

2008-01-07 Thread Guilherme Polo
2008/1/7, Baz Walter <[EMAIL PROTECTED]>: > Hello > > I remember reading somewhere (probably this list) that python may cache the > module that starts a program (e.g. 'main.py'). Something like mod_python will do caching. > I'm asking because I have found > that this can sometimes cause problems

Re: any() and all() shorthand

2008-01-07 Thread castironpi
> You are too late, any and all are built-in into python 2.5 Hi, excellent. Now how about something more generic, possibly: [ x.y() for x or _next_ in c ] where the context of _next_ is limited in complexity, and/or can only occur in a generator? -- http://mail.python.org/mailman/listinfo/pyth

Re: Does Python cache the startup module?

2008-01-07 Thread kyosohma
On Jan 7, 12:30 pm, Baz Walter <[EMAIL PROTECTED]> wrote: > Hello > > I remember reading somewhere (probably this list) that python may cache the > module that starts a program (e.g. 'main.py'). I'm asking because I have found > that this can sometimes cause problems when making small edits to the

Re: Does Python cache the startup module?

2008-01-07 Thread Baz Walter
Guilherme Polo gmail.com> writes: > Uhm.. this didn't make much sense. If you say the module is cached, > then supposing you did a minor edit, and then supposing because it is > cached your application wouldn't detect the change, then I don't see > the connection with memory leak. > > Bring some

PostgreSQL Conference East: Call for Papers

2008-01-07 Thread [EMAIL PROTECTED]
PostgreSQL Conference East is being held on the weekend of March 29th and 30th, 2008 in College Park, Maryland. The conference will have a series of talks, mini-tutorials and tutorials and we are now accepting submissions! If you are a third pary vendor, PostgreSQL developer, PostgreSQL consultant

RE: dictionary/hash and '1' versus 1

2008-01-07 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Paddy > Sent: Monday, January 07, 2008 12:52 PM > To: python-list@python.org > Subject: Re: dictionary/hash and '1' versus 1 > > Or how using different operators for similar operations on differ

Re: any() and all() shorthand

2008-01-07 Thread Guilherme Polo
2008/1/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > You are too late, any and all are built-in into python 2.5 > > Hi, excellent. Now how about something more generic, possibly: > > [ x.y() for x or _next_ in c ] > > where the context of _next_ is limited in complexity, and/or can only > occur in

Re: Does Python cache the startup module?

2008-01-07 Thread Fredrik Lundh
Baz Walter wrote: > It's hard to supply an example for this, since it is local to the machine I > am > using. The startup module would look something like this: would look, or does look? if it doesn't look like this, what else does it contain? > #!/usr/local/bin/python > > if __name__ == '_

Re: any() and all() shorthand

2008-01-07 Thread castironpi
On Jan 7, 1:29 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > 2008/1/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > > > You are too late, any and all are built-in into python 2.5 > > > Hi, excellent. Now how about something more generic, possibly: > > > [ x.y() for x or _next_ in c ] > > > where

Re: Does Python cache the startup module?

2008-01-07 Thread Baz Walter
Fredrik Lundh pythonware.com> writes: > > Baz Walter wrote: > > > It's hard to supply an example for this, since it is local to the machine I am > > using. The startup module would look something like this: > > would look, or does look? if it doesn't look like this, what else does > it con

Re: dictionary/hash and '1' versus 1

2008-01-07 Thread Paddy
On Jan 7, 7:26 pm, "Reedick, Andrew" <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:python- > > [EMAIL PROTECTED] On Behalf Of Paddy > > Sent: Monday, January 07, 2008 12:52 PM > > To: [EMAIL PROTECTED] > > Subject: Re: dictionary/hash and '1' versus 1

Re: TIOBE declares Python as programming language of 2007!

2008-01-07 Thread ajaksu
On Jan 7, 9:53 am, Berco Beute <[EMAIL PROTECTED]> wrote: > Cool! We knew it would happen one day :) > What could be the reason? Python 3? Jython 2.2? Java's loss of > sexiness? > > What I would like to know is what it was that boosted Python's > popularity in 2004 (seehttp://www.tiobe.com/tiobe_in

Re: TIOBE declares Python as programming language of 2007!

2008-01-07 Thread Bruno Desthuilliers
Diez B. Roggisch a écrit : > Berco Beute schrieb: > >> Cool! We knew it would happen one day :) >> What could be the reason? Python 3? Jython 2.2? Java's loss of >> sexiness? > > > I'd say Java was never sexy, but dressed up in expensive lingerie by > marketing maniacs... +2 QOTW > Diez -- h

Any interest in an SQS alternative???

2008-01-07 Thread cbmeeks
I'm a big fan of Amazon's SQS web services. However, I think their SQS is simply too expensive. I was doing some tests in python using SQS and created 1,513 messages in just a few minutes. Then I looked at my bill. It was $0.15 not counting the S3 fee. $0.15 seems like a lot to me for the appl

Re: Does Python cache the startup module?

2008-01-07 Thread Fredrik Lundh
Baz Walter wrote: > Before changing the name 'mainwindow' to 'mainwidget' it reports: > > Widgets left: 0Max widgets: 2 > Widgets left: 0Max widgets: 149 (full program) > > Afterwards it reports: > > Widgets left: 1Max widgets: 2 > Widgets left: 146Max widgets: 149 (full program

Re: Does Python cache the startup module?

2008-01-07 Thread John Machin
On Jan 8, 6:21 am, Baz Walter <[EMAIL PROTECTED]> wrote: > Guilherme Polo gmail.com> writes: > > > Uhm.. this didn't make much sense. If you say the module is cached, > > then supposing you did a minor edit, and then supposing because it is > > cached your application wouldn't detect the change, t

Re: Python's great, in a word

2008-01-07 Thread Dustan
On Jan 7, 11:40 am, Martin Marcher <[EMAIL PROTECTED]> wrote: > it's pythonicness. "it is pythonicness"??? -- http://mail.python.org/mailman/listinfo/python-list

Re: any() and all() shorthand

2008-01-07 Thread castironpi
On Jan 7, 1:45 pm, [EMAIL PROTECTED] wrote: > On Jan 7, 1:29 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > > The idea is a shorthand for reduce. Here, _next_ meant the next item > in the iterable c. 'Only' is another known quantifier in logic: 'all and only'. Any (there exists) and all (for

Re: any() and all() shorthand

2008-01-07 Thread Tim Chase
> The idea is a shorthand for reduce. Here, _next_ meant the next item > in the iterable c. You mean like one of these: def lookahead(iterator): i = iter(iterator) x = i.next() for item in i: yield x, item x = item def lookahead2(iterator, **kwarg): i = i

Tutorials at PyCon 2008 (US)

2008-01-07 Thread Greg Lindstrom
Hello Everyone- I'd like to announce the tutorials sessions for PyCon 2008 (US). As you may know, this year PyCon is being held in Chicago, Illinois March 14-16 with the Thursday before (the 13th) being "Tutorial Thursday". We are expecting nearly 600 Python enthusiasts to meet up for the confer

Re: TIOBE declares Python as programming language of 2007!

2008-01-07 Thread Richard Jones
Berco Beute wrote: > What I would like to know is what it was that boosted Python's > popularity in 2004 (see http://www.tiobe.com/tiobe_index/Python.html). > Equally interesting is the question why it dropped shortly after. They explain the discontinuity on the index page in the FAQ. Richar

Re: Killing worker threads

2008-01-07 Thread Ruediger
maybe following recipe from activestate may be usefull. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496960 http://sebulba.wikispaces.com/recipe+thread2 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's great, in a word

2008-01-07 Thread Martin Marcher
On Monday 07 January 2008 21:25 Dustan wrote: > On Jan 7, 11:40 am, Martin Marcher <[EMAIL PROTECTED]> wrote: >> it's pythonicness. > > "it is pythonicness"??? not all here are native english speakers, but thanks for the correction. I'll try to keep it in mind. -- http://noneisyours.marcher.na

Re: Python's great, in a word

2008-01-07 Thread Pablo Ziliani
Dustan wrote: > On Jan 7, 11:40 am, Martin Marcher <[EMAIL PROTECTED]> wrote: > >> it's pythonicness. >> > > "it is pythonicness"??? > Obviously a typo, for "It is pythonic, Ness". A reference to the well-known Loch Ness Monster, definitely pythonic if you see some pictures: http://ima

  1   2   >