Re: map

2009-08-31 Thread alex23
Piet van Oostrum wrote: > [myFunc(elt, 'booHoo') for elt in myList] is also a good candidate and > in this case I think it is preferable to both the loop and the map with > a partial or lambda in terms of clarity. >From memory, a listcomp with a non-builtin function is also faster than map with t

Re: Executing python script stored as a string

2009-08-31 Thread Steven D'Aprano
On Mon, 31 Aug 2009 16:29:45 -0700, Ecir Hana wrote: > Hello, > > please, how to execute a python script stored as a string? But let me > impose several limitations, so simple "exec" wont work: > > - if I understood it correctly defining a function in the string and > exec-ing it created the fun

Re: Why does this group have so much spam?

2009-08-31 Thread r
On Aug 31, 2:04 pm, David <71da...@libero.it> wrote: (snip) > It's a question of point of view: in italy if a thief steals a car and > causes an accident the car's owner's assurance (having a car assurance is > mandatory) must refund the victims. That's because protections of victims is > first pri

Re: multiprocessing managers and socket connection.

2009-08-31 Thread Terry
On Aug 26, 7:25 pm, Chris wrote: > On Aug 25, 9:11 pm, Terry wrote: > > > > > > > On Aug 25, 10:14 pm, Chris wrote: > > > > I've been using multiprocessing managers and I really like the > > > functionality. > > > > I have a question about reconnecting to a manager. I have a situation > > > wher

Re: Return value of multiprocessing manager registerred function

2009-08-31 Thread Terry
On Aug 31, 5:58 pm, jacopo wrote: > Hi Terry, > I have just started working on similar things and I am strugling to > find examples or documentations. So far I have found only the official > documentation of the multiprocessing package. Would you be able to > recommend me some good reference or a

Re: Overriding iadd for dictionary like objects

2009-08-31 Thread Aahz
In article , RunThePun wrote: >On Aug 30, 10:33=A0pm, a...@pythoncraft.com (Aahz) wrote: >> In article .com>, >> RunThePun =A0 wrote: >>> >>>I made a DictMixin where the keys are filenames and the values are the >>>file contents. It was very simple and easy to do thanks to DictMixin. >>> >>>For e

Re: a popen question. Please help

2009-08-31 Thread Aahz
In article , Tim Chase wrote: > >Darn "standards" :-/ The wonderful thing about standards is that there are so many to choose from. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "I support family values -- Addams family values" --www.nancybuttons.com -- http

Re: Is behavior of += intentional for int?

2009-08-31 Thread Steven D'Aprano
On Mon, 31 Aug 2009 10:21:22 -0700, zaur wrote: > As a result of this debate is not whether we should conclude that there > should be two types of integers in python: 1) immutable numbers, which > behave as constant value; 2) mutable numbers, which behave as variable > value? What can you do with

Executing python script stored as a string

2009-08-31 Thread Ecir Hana
Hello, please, how to execute a python script stored as a string? But let me impose several limitations, so simple "exec" wont work: - if I understood it correctly defining a function in the string and exec-ing it created the function in current scope. This is something I really don't want - sim

Re: An assessment of the Unicode standard

2009-08-31 Thread Byung-Hee HWANG
Nigel Rantor writes: > Hendrik van Rooyen wrote: >> On Sunday 30 August 2009 22:46:49 Dennis Lee Bieber wrote: >> >>> Rather elitist viewpoint... Why don't we just drop nukes on some 60% >>> of populated landmasses that don't have a "western" culture and avoid >>> the whole problem? >> >> Now

Re: Python installation

2009-08-31 Thread Benjamin Kaplan
On Mon, Aug 31, 2009 at 9:32 PM, Vo, Trinh (388C) wrote: > Hello Python Users, > > > > I am new to Python.  I have errors message when I installed Python.  I > appreciate if you can help. > > > > I download Python-2.6-2.  I then did the following steps: > > ./configure > > make > > > > In the secon

Python installation

2009-08-31 Thread Vo, Trinh (388C)
Hello Python Users, I am new to Python. I have errors message when I installed Python. I appreciate if you can help. I download Python-2.6-2. I then did the following steps: ./configure make In the second step "make", I had the following message: Failed to find the necessary bits to build

Re: lambda functions

2009-08-31 Thread Rhodri James
On Mon, 31 Aug 2009 08:41:57 +0100, Pierre wrote: Hello, I would like to know if it is possible to define a loop in a lambda function How to manage the indents ? Example : s_minus_1 = lambda s : for index in range(0, len(s)) : s[index] = s [index]-1 You can't use commands in a lambda

Re: Object Reference question

2009-08-31 Thread Ethan Furman
josef wrote: On Aug 27, 1:35 pm, Ethan Furman wrote: josef wrote: Thanks to everyone who responded. I will be going with some sort of a = MyClass(name = 'a') format. It's the Python way. For me, it was very hard to accept that EVERYTHING is an object reference. And that there are no ob

Re: Efficient way to sum a product of numbers...

2009-08-31 Thread Jan Kaliszewski
31-08-2009 o 22:28:56 Jan Kaliszewski wrote: >>> setup = "from itertools import starmap, imap ; from operator import mul; import random, string; names = [rndom.choice(string. ascii_letters) for x in xrange(1)]; hours = [random.randint( 1, 12) for x in xrange(1000)]; m = zip(names, hours); w

Re: win32ui DLL Load Failed

2009-08-31 Thread MikeC
On Aug 31, 12:43 pm, MikeC wrote: > I have a python executable that's failing to load on a user's machine > running Windows XP. My developer machine is also running Windows XP. I > have determined that it is failing when it attempts to load win32ui. > > I have Python 2.6 on my developer machine an

Re: pyjamas in action?

2009-08-31 Thread André
On Aug 31, 4:46 pm, kj wrote: > At work we want to implement a webapp using Google's GWT, and we're > debating whether to use the standard GWT approach with Java, or to > try Pyjamas.  There's no great love here for Java, but there's the > concern that Pyjamas will not be able to deliver the full

Re: Efficient way to sum a product of numbers...

2009-08-31 Thread Jan Kaliszewski
31-08-2009 o 18:19:28 vsoler wrote: Say m= [[ 'a', 1], [ 'b', 2],[ 'a', 3]] r={'a':4, 'b':5, 'c':6} What I need is the calculation 1*4 + 2*5 + 3*4 = 4 + 10 + 12 = 26 That is, for each row list in variable 'm' look for its first element in variable 'r' and multiply

Re: map

2009-08-31 Thread Nobody
On Sun, 30 Aug 2009 21:55:52 -0700, elsa wrote: > say I have a list, myList. Now say I have a function with more than > one argument: > > myFunc(a, b='None') > > now, say I want to map myFunc onto myList, with always the same > argument for b, but iterating over a: > > map(myFunc(b='booHoo'), m

Re: win32ui DLL Load Failed

2009-08-31 Thread Chris Kaynor
You likely need to install the Microsoft Visual C++ 2008 SP1 Redistributable Package on the target machine. If you search Google for this, you should find it (make sure to grab the correct version of x86 or x64 depending upon the Python version). Chris On Mon, Aug 31, 2009 at 12:43 PM, MikeC w

Re: win32ui DLL Load Failed

2009-08-31 Thread Mike Driscoll
On Aug 31, 2:43 pm, MikeC wrote: > I have a python executable that's failing to load on a user's machine > running Windows XP. My developer machine is also running Windows XP. I > have determined that it is failing when it attempts to load win32ui. > > I have Python 2.6 on my developer machine and

pyjamas in action?

2009-08-31 Thread kj
At work we want to implement a webapp using Google's GWT, and we're debating whether to use the standard GWT approach with Java, or to try Pyjamas. There's no great love here for Java, but there's the concern that Pyjamas will not be able to deliver the full power and/or convenience of standard

Re: An assessment of the Unicode standard

2009-08-31 Thread Emile van Sebille
On 8/31/2009 10:41 AM Dennis Lee Bieber said... On Mon, 31 Aug 2009 15:36:46 +0100, Nigel Rantor Also, I'm surprised no-one has mentioned Esperanto yet. Sounds like something r and Xah would *love*. Hmmm, thought I had mentioned Esperanto (and Klingon) Just curious -- has anyone

Unexpected 411 error response using httplib

2009-08-31 Thread John Gordon
I'm writing some code that queries a Microsoft Exchange Web Services server. The server is responding with a 411 Length Required error, which is strange because I am definitely sending a Content-Length header. Here's the code: - import httplib i

win32ui DLL Load Failed

2009-08-31 Thread MikeC
I have a python executable that's failing to load on a user's machine running Windows XP. My developer machine is also running Windows XP. I have determined that it is failing when it attempts to load win32ui. I have Python 2.6 on my developer machine and am using the pywin support (Mark Hammonds?

Re: Logging contents of IRC channel

2009-08-31 Thread Jonathan Gardner
On Aug 31, 10:23 am, devaru wrote: > I am new to Python. I want to log the activities in an IRC channel. > Any pointers regarding this would be of great help. How are you going to plug into the chat server to obtain the data? How will you store the data? The in between parts are really easy. --

Re: find free hard disk space remote windows host

2009-08-31 Thread Tim Golden
Daniel wrote: Hello, I'm trying to determine the amount of free hard disk space on a remote windows host. Seems like this should be simple, but it's giving me grief. Here's what I've tried: mystat = os.stat('//remotehost/share/') mystat (16895, 0L, 0, 0, 0, 0, 0L, 1251731920, 1251731289, 12

Re: Logging contents of IRC channel

2009-08-31 Thread Paul Rubin
devaru writes: > I am new to Python. I want to log the activities in an IRC channel. > Any pointers regarding this would be of great help. http://science.slashdot.org/science/04/04/13/1356216.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Efficient way to sum a product of numbers...

2009-08-31 Thread Paul Rubin
vsoler writes: > m= [[ 'a', 1], [ 'b', 2],[ 'a', 3]] > r={'a':4, 'b':5, 'c':6} > > What I need is the calculation > > 1*4 + 2*5 + 3*4 = 4 + 10 + 12 = 26 sum(r[k]*w for k,w in m) -- http://mail.python.org/mailman/listinfo/python-list

Re: IDE for Python

2009-08-31 Thread Chris Colbert
I'm a big fan of wing. Pay for the non-free version and you get all the goodies, plus PHENOMENAL support. Really. They answer support emails within a few minutes. Its has the best code completion i've seen in any python editor/ide and is also the most stable, fastest (for ide's), and customizable.

Re: Is behavior of += intentional for int?

2009-08-31 Thread Carl Banks
On Aug 31, 10:21 am, zaur wrote: > On 29 авг, 16:45, zaur wrote: > > > > > > > Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39) > > [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin > > Type "copyright", "credits" or "license()" for more information.>>> a=1 > > >>> x=[a] > > >>> id(a)==id(x

Re: Is behavior of += intentional for int?

2009-08-31 Thread zaur
On 29 авг, 16:45, zaur wrote: > Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39) > [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin > Type "copyright", "credits" or "license()" for more information.>>> a=1 > >>> x=[a] > >>> id(a)==id(x[0]) > True > >>> a+=1 > >>> a > 2 > >>> x[0] > > 1 > >

Re: An assessment of Tkinter and IDLE

2009-08-31 Thread r
On Aug 28, 11:12 am, Mark Roseman wrote: > Would it be useful to link to this from the main Python Tkinter > documentation? > > Mark Sorry Mark, i did not realize when i replied to you that YOU are the Mark of tkdoc.com. For some reason i only saw Tcl code when i visted the site, and that prompte

Re: Efficient way to sum a product of numbers...

2009-08-31 Thread vsoler
On Aug 31, 6:59 pm, Tim Chase wrote: > vsoler wrote: > > On Aug 31, 6:30 pm, Tim Chase wrote: > >>> After simplifying my problem, I can say that I want to get the sum of > >>> the product of two culumns: > >>> Say > >>>          m= [[ 'a', 1], [ 'b', 2],[ 'a', 3]] > >> assuming you meant ['c', 3]

Re: An assessment of Tkinter and IDLE

2009-08-31 Thread r
Kevin and Terry, Kevin. I respectfully disagree that the site is ready for prime time *However* i do not wish to undermine the great work that Mark Roseman has done here and i thank him for his contribution. He has put much work into covering all the major languages and i think this site *could*

Re: Efficient way to sum a product of numbers...

2009-08-31 Thread Tim Chase
vsoler wrote: On Aug 31, 6:30 pm, Tim Chase wrote: After simplifying my problem, I can say that I want to get the sum of the product of two culumns: Say m= [[ 'a', 1], [ 'b', 2],[ 'a', 3]] assuming you meant ['c', 3] here...^> r={'a':4, 'b':5, 'c':6} What I need is the

Re: Efficient way to sum a product of numbers...

2009-08-31 Thread vsoler
On Aug 31, 6:30 pm, Tim Chase wrote: > > After simplifying my problem, I can say that I want to get the sum of > > the product of two culumns: > > > Say > >          m= [[ 'a', 1], [ 'b', 2],[ 'a', 3]] > > assuming you meant ['c', 3] here...    ^>          r={'a':4, 'b':5, 'c':6} > > > What I need

Re: rcond in numpy :

2009-08-31 Thread Robert Kern
On 2009-08-31 04:02 AM, Pierre wrote: Hello, Anyone knows the numpy equivalent of the matlab function : rcond (Matrix reciprocal condition number estimate) ? You will want to ask numpy questions on the numpy mailing list: http://www.scipy.org/Mailing_Lists numpy.linalg.cond() will give yo

Re: executable path finding

2009-08-31 Thread koranthala
On Aug 31, 9:07 pm, "Diez B. Roggisch" wrote: > koranthala wrote: > > Hi, > >     I am creating a python application using py2exe. I am facing a > > problem which I am not sure how to solve. > >     The application contains many other files associated with it - > > like icons, config files etc. Th

Re: An assessment of the Unicode standard

2009-08-31 Thread Rami Chowdhury
No need to feed the troll by actually trying to engage in the discussion, but just FYI: Sanskrit is mostly written in Devanagari these days which is also useful for selling things to people who speak Hindi and other Indian languages. Devanagari is what's used for Hindi and a handful of ot

Re: Efficient way to sum a product of numbers...

2009-08-31 Thread Tim Chase
After simplifying my problem, I can say that I want to get the sum of the product of two culumns: Say m= [[ 'a', 1], [ 'b', 2],[ 'a', 3]] assuming you meant ['c', 3] here...^ r={'a':4, 'b':5, 'c':6} What I need is the calculation 1*4 + 2*5 + 3*4 = 4 + 10 + 12 =

Efficient way to sum a product of numbers...

2009-08-31 Thread vsoler
Hi, After simplifying my problem, I can say that I want to get the sum of the product of two culumns: Say m= [[ 'a', 1], [ 'b', 2],[ 'a', 3]] r={'a':4, 'b':5, 'c':6} What I need is the calculation 1*4 + 2*5 + 3*4 = 4 + 10 + 12 = 26 That is, for each row list in varia

find free hard disk space remote windows host

2009-08-31 Thread Daniel
Hello, I'm trying to determine the amount of free hard disk space on a remote windows host. Seems like this should be simple, but it's giving me grief. Here's what I've tried: >>> mystat = os.stat('//remotehost/share/') >>> mystat (16895, 0L, 0, 0, 0, 0, 0L, 1251731920, 1251731289, 1249399952)

Re: executable path finding

2009-08-31 Thread Diez B. Roggisch
koranthala wrote: > Hi, > I am creating a python application using py2exe. I am facing a > problem which I am not sure how to solve. > The application contains many other files associated with it - > like icons, config files etc. The executable can be in any directory. > If the user create

executable path finding

2009-08-31 Thread koranthala
Hi, I am creating a python application using py2exe. I am facing a problem which I am not sure how to solve. The application contains many other files associated with it - like icons, config files etc. The executable can be in any directory. If the user creates a shortcut to the executable

Re: lambda functions

2009-08-31 Thread Paul Rubin
Pierre writes: > s_minus_1 = lambda s : for index in range(0, len(s)) : s[index] = s > [index]-1 What are you trying to do here anyway? That looks broken. Maybe you want the list.insert method. -- http://mail.python.org/mailman/listinfo/python-list

Re: map

2009-08-31 Thread Paul Rubin
elsa writes: > map(myFunc(b='booHoo'), myList) > > Why doesn't this work? is there a way to make it work? You can use functools.partial but a listcomp might be simpler: list(myfunc(a, b='booHoo') for a in myList) There is another listcomp syntax with square brackets, but I try to avoid it b

Re: An assessment of Tkinter and IDLE

2009-08-31 Thread Terry Reedy
Kevin Walzer wrote: www.tkdocs.com [snip] and you'll have learned a lot. But I think the TkDocs site is essential, especially in its more advanced discussion of how to put together an attractive, polished user interface with Tk. Tk has a long-standing reputation of being the toolkit of choice

Re: IDE for Python

2009-08-31 Thread Che M
On Aug 31, 10:53 am, Mike Driscoll wrote: > On Aug 29, 1:08špm, ivanko@gmail.com wrote: > > > 29.08.2009 4:14 ÐÏÌØÚÏ×ÁÔÅÌØ "Thangappan.M" š > > ÎÁÐÉÓÁÌ: > > > > Dear all, > > > Please suggest some good IDE for python.I am working in linux platform. > > > -- > > > Regards, > > > Thangappan.M >

Re: IDE for Python

2009-08-31 Thread Mike Driscoll
On Aug 29, 1:08 pm, ivanko@gmail.com wrote: > 29.08.2009 4:14 пользователь "Thangappan.M"   > написал: > > > Dear all, > > Please suggest some good IDE for python.I am working in linux platform. > > -- > > Regards, > > Thangappan.M > > You can use Eclipse + PyDev or Emacs+PythonMode . Also the

Re: a popen command line question

2009-08-31 Thread Nitebirdz
On Sat, Aug 29, 2009 at 01:13:12PM -0700, Joni Lee wrote: > Hi all, > > I write a small script > > status = os.popen('top').readlines() > print status > > It calls the command line "top" and will print out the status. > But I have to press the keyboard "q" to quit "top", then the status > will b

Re: An assessment of the Unicode standard

2009-08-31 Thread Nigel Rantor
Hendrik van Rooyen wrote: On Sunday 30 August 2009 22:46:49 Dennis Lee Bieber wrote: Rather elitist viewpoint... Why don't we just drop nukes on some 60% of populated landmasses that don't have a "western" culture and avoid the whole problem? Now yer talking, boyo! It will surely hel

Re: Suggestion

2009-08-31 Thread Nitebirdz
On Sat, Aug 29, 2009 at 02:42:36PM +0530, Thangappan.M wrote: > Dear all, > > I am in the process of learning Python programming language. I know > Perl,PHP. Compare to both the language Python impressed me because here > there is no lexical variables and all.Now I need suggestion saying

Math Notations, Computer Languages, and the “Form ” in Formalism

2009-08-31 Thread Xah Lee
• Math Notations, Computer Languages, and the “Form” in Formalism http://xahlee.org/cmaci/notation/index.html plain text version follows. (lacks links) - Math Notations, Computer Languages, and the “Form” in Formalism Xah Lee, 2009-08-31 This page is a collection o

Re: An assessment of Tkinter and IDLE

2009-08-31 Thread Kevin Walzer
On 8/28/09 8:11 PM, r wrote: On Aug 28, 5:48 pm, Mark Roseman wrote: (snip) Thewww.tkdocs.comsite is 'language neutral' - currently the tutorial covers Tcl, Perl, Ruby and yes Python, and allows you to switch between any of those languages (or show all of them). True, however the coverage is

Re: map

2009-08-31 Thread Hendrik van Rooyen
On Monday 31 August 2009 11:31:34 Piet van Oostrum wrote: > But ultimately it is also very much a matter of taste, preference and > habit. This is true, but there is another reason that I posted - I have noticed that there seems to be a tendency amongst newcomers to the group to go to great len

Re: map

2009-08-31 Thread Steven D'Aprano
On Mon, 31 Aug 2009 10:43:07 +0200, Hendrik van Rooyen wrote: > Here is some heretical advice: > > Do not use stuff like map and reduce unless they fit what you want to do > perfectly, and "JustWorks" the first time. > > You have a very clear idea of what you want to do, so why do you not > just

Re: Object's nesting scope

2009-08-31 Thread Bruno Desthuilliers
zaur a écrit : On 28 авг, 16:07, Bruno Desthuilliers wrote: zaur a écrit : On 26 авг, 17:13, "Diez B. Roggisch" wrote: Whom am we to judge? Sure if you propose this, you have some usecases in mind - how about you present these Ok. Here is a use case: object initialization. For example, p

Re: starting a client remotely

2009-08-31 Thread Gabriel Genellina
On Aug 31, 12:47 pm, "Diez B. Roggisch" wrote: jacopo wrote: > I am playing with multiprocessing and I would like to have a python > script on one machine which initialize my whole system, in other > words, this script should start the server (a python script) on my > local machine and the clien

Re: starting a client remotely

2009-08-31 Thread Diez B. Roggisch
jacopo wrote: > thank you Diez, > unfortunatelly I am on Windows NT. > Did you use SSH in a python script? Via subprocess, yes. Paramiko would be a way, too. > Isn't multiprocessing.managers already doing something like Pyro? I never used it, so I don't know - but it appears to be, yes. Doesn't

[ANN] PyYAML-3.09: YAML parser and emitter for Python

2009-08-31 Thread Kirill Simonov
Announcing PyYAML-3.09 A new bug fix release of PyYAML is now available: http://pyyaml.org/wiki/PyYAML Note that PyYAML supports both Python 2 and Python 3. For compatibility notes, please see http://pyyaml.org/wiki/PyYAMLDocumentatio

Re: starting a client remotely

2009-08-31 Thread jacopo
thank you Diez, unfortunatelly I am on Windows NT. Did you use SSH in a python script? Isn't multiprocessing.managers already doing something like Pyro? thanks Jacopo On Aug 31, 12:47 pm, "Diez B. Roggisch" wrote: > jacopo wrote: > > I am playing with multiprocessing and I would like to have a

Re: Is behavior of += intentional for int?

2009-08-31 Thread Piet van Oostrum
> Derek Martin (DM) wrote: >DM> On Sun, Aug 30, 2009 at 03:42:06AM -0700, Paul McGuire wrote: >>> Is it any odder that 3 is an object than that the string literal >>> "Hello, World!" is an object? >DM> Yes. Because 3 is a fundamental bit of data that the hardware knows >DM> how to deal w

Re: Return value of multiprocessing manager registerred function

2009-08-31 Thread jacopo
Hi Terry, I have just started working on similar things and I am strugling to find examples or documentations. So far I have found only the official documentation of the multiprocessing package. Would you be able to recommend me some good reference or a book. I dont want to overwhelm this newsgroup

Re: starting a client remotely

2009-08-31 Thread Diez B. Roggisch
jacopo wrote: > I am playing with multiprocessing and I would like to have a python > script on one machine which initialize my whole system, in other > words, this script should start the server (a python script) on my > local machine and the clients (python scripts) on the other machines > in my

starting a client remotely

2009-08-31 Thread jacopo
I am playing with multiprocessing and I would like to have a python script on one machine which initialize my whole system, in other words, this script should start the server (a python script) on my local machine and the clients (python scripts) on the other machines in my local network. Would yo

Re: map

2009-08-31 Thread Piet van Oostrum
> Hendrik van Rooyen (HvR) wrote: >HvR> On Monday 31 August 2009 06:55:52 elsa wrote: >HvR> 8< - map question >>> >>> (Ultimately, I want to call myFunc(myList[0], 'booHoo'), myFunc(myList >>> [1], 'booHoo'), myFunc(myList[2], 'booHoo') etc. However, I m

Re: map

2009-08-31 Thread Gabriel Genellina
En Mon, 31 Aug 2009 05:43:07 -0300, Hendrik van Rooyen escribió: On Monday 31 August 2009 06:55:52 elsa wrote: (Ultimately, I want to call myFunc(myList[0], 'booHoo'), myFunc(myList [1], 'booHoo'), myFunc(myList[2], 'booHoo') etc. However, I might want to call myFunc(myList[0], 'woo'), myFunc

rcond in numpy :

2009-08-31 Thread Pierre
Hello, Anyone knows the numpy equivalent of the matlab function : rcond (Matrix reciprocal condition number estimate) ? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: map

2009-08-31 Thread Hendrik van Rooyen
On Monday 31 August 2009 06:55:52 elsa wrote: 8< - map question > > (Ultimately, I want to call myFunc(myList[0], 'booHoo'), myFunc(myList > [1], 'booHoo'), myFunc(myList[2], 'booHoo') etc. However, I might want > to call myFunc(myList[0], 'woo'), myFunc(myLis

Re: An assessment of the Unicode standard

2009-08-31 Thread Hendrik van Rooyen
On Sunday 30 August 2009 22:46:49 Dennis Lee Bieber wrote: > Rather elitist viewpoint... Why don't we just drop nukes on some 60% > of populated landmasses that don't have a "western" culture and avoid > the whole problem? Now yer talking, boyo! It will surely help with the basic problem w

Re: lambda functions

2009-08-31 Thread Gabriel Genellina
En Mon, 31 Aug 2009 04:41:57 -0300, Pierre escribió: I would like to know if it is possible to define a loop in a lambda function How to manage the indents ? Example : s_minus_1 = lambda s : for index in range(0, len(s)) : s[index] = s [index]-1 You can't. lambda is just a way to defin

Re: lambda functions

2009-08-31 Thread Chris Rebert
On Mon, Aug 31, 2009 at 12:41 AM, Pierre wrote: > Hello, > > I would like to know if it is possible to define a loop in a lambda > function Not possible. Lambdas can only contain a single expression. A loop is a block statement. Just use a named function instead. There's nothing that can be do

Re: initilize a memory zone in python

2009-08-31 Thread Diez B. Roggisch
Mug schrieb: On Aug 30, 8:58 pm, "Diez B. Roggisch" wrote: Mug schrieb: hello, i'm new in python, i used to program in C, i have a small problem, i tryed to do some serial port things manipulation with python. i have something like: import sys,termios fd = sys.stdin.fileno() term_conf=termios

Re: lambda functions

2009-08-31 Thread Javier Collado
Hello, This page has some advice about how to avoid some of the lambda functions limitations: http://p-nand-q.com/python/stupid_lambda_tricks.html In particular, it suggests to use map function instead of for loops. Best regards, Javier 2009/8/31 Pierre : > Hello, > > I would like to know i

Re: An assessment of Tkinter and IDLE

2009-08-31 Thread eb303
On Aug 28, 4:41 pm, r wrote: > Thanks eb303 for the wonderful post > > I have looked over the new ttk widgets and everything looks nice. I am > very glad to see the death of Tix as i never much liked it anyhow and > always believed these widgets should have been in the main Tkinter > module to sta

lambda functions

2009-08-31 Thread Pierre
Hello, I would like to know if it is possible to define a loop in a lambda function How to manage the indents ? Example : s_minus_1 = lambda s : for index in range(0, len(s)) : s[index] = s [index]-1 Thanks ! -- http://mail.python.org/mailman/listinfo/python-list