Re: Simple distributed example for learning purposes?

2009-12-31 Thread Tim Golden
Nobody wrote: On Sat, 26 Dec 2009 20:06:02 +, Tim Golden wrote: I'm trying to come up with something which will illustrate the usefulness of a distributed processing model. Since I may not be using the term "distributed" exactly, my criteria are: * It should be clear that the application p

Re: Sys.path entries

2009-12-31 Thread Gabriel Genellina
En Thu, 31 Dec 2009 04:31:06 -0300, Marco Salden escribió: On Dec 30, 8:13 pm, Alan Harris-Reid wrote: Hi there, In my sys.path (interpreter only, no application loaded), I have the following strange entries... 'C:\\WINDOWS\\system32\\python31.zip'. This file does not exist anywhere (alth

Re: Dangerous behavior of list(generator)

2009-12-31 Thread Peter Otten
Tom Machinski wrote: > It would be nice if there was a builtin for "get the first element in > a genexp, or raise an exception (which isn't StopIteration)", sort of > like: > > from itertools import islice > > def first_or_raise(genexp): > L = list(islice(genexp, 1)) > if not L:

pywinauto to show the dialog , menu, etc

2009-12-31 Thread Hari
Hi I am using pywinauto to automate an custom program to startup and load process , execute etc. But cannot determine menuselect. Is there a way or tool which can run against the exe to show the menu, dialog box, list box which are contained within it. Is there a way to get this information us

Re: Thread performance on Python 2.6

2009-12-31 Thread Jan Kaliszewski
31-12-2009 Rodrick Brown wrote: I started dabbling with threads in python and for some odd reason the performance seems extremely poor on my 2 core system. It this a simplified version spawn 2 threads write some data to a file and time the results vs doing the same sequentially. Why is the p

Re: Sys.path entries

2009-12-31 Thread Alan Harris-Reid
Marco Salden wrote: On Dec 30, 8:13 pm, Alan Harris-Reid wrote: Hi there, In my sys.path (interpreter only, no application loaded), I have the following strange entries... 'C:\\WINDOWS\\system32\\python31.zip'. This file does not exist anywhere (although python31.dll does exist in \windows

Re: Sys.path entries

2009-12-31 Thread Alan Harris-Reid
Gabriel Genellina wrote: En Thu, 31 Dec 2009 04:31:06 -0300, Marco Salden escribió: On Dec 30, 8:13 pm, Alan Harris-Reid wrote: Hi there, In my sys.path (interpreter only, no application loaded), I have the following strange entries... 'C:\\WINDOWS\\system32\\python31.zip'. This file does

Re: whoops: create a splash window in python

2009-12-31 Thread Steve Holden
Ron Croonenberg wrote: > sorry about posting with the wrong subject... > Ron: In general it's a bad idea to try and start a new thread by replying to an existing post, even if you *do* change the subject line. I don't normally post attachments on this list (it's somewhat contrary to accepted net

Re: Create attribute from string

2009-12-31 Thread Steve Holden
Chris Rebert wrote: > On Wed, Dec 30, 2009 at 9:22 PM, AON LAZIO wrote: >> Hi, >> I would like to know how we could create attribute from string >> >> say I want to assign value 0.05 to an object attribute >> >> I like to input "SIGNIFICANT" and 0.05 and get >> object.SIGFICANT equals to 0.05

Re: multithreading, performance, again...

2009-12-31 Thread Antoine Pitrou
> 39123 function calls (38988 primitive calls) in 6.004 CPU > seconds > [...] > > It's not burning CPU time in the main thread (profiling with cProfile > indicated smth similar to the above), it's not burning it in the > individual worker threads What do you mean, it's not b

Re: Dynamic text color

2009-12-31 Thread Dave McCormick
John, Thank you for the tips. I was changing the line-column index to a FLOAT because the search would return the starting position (pos) of the string, then by making it a FLOAT and adding the string length I was able to get the end position. If "red" was on line 1 column 0.. Tbox.ta

Re: Dynamic text color

2009-12-31 Thread Lie Ryan
On 1/1/2010 2:24 AM, Dave McCormick wrote: If I count characters from the beginning how do I know what line the text is on? Would you mind making your last hint a bit stronger... From http://infohost.nmt.edu/tcc/help/pubs/tkinter/text-index.html: """ + n chars From the given index, move f

Length of an Unsized Object

2009-12-31 Thread Victor Subervi
Hi; I have this code: sql = 'describe %s %s;' % (optionsStore, option) print sql cursor.execute(sql) descr = cursor.fetchone() if len(descr) is not None: Python complains: *TypeError*: len() of unsized object Please advise how to rewrite the last line so

Python-URL! - weekly Python news and links (Dec 31)

2009-12-31 Thread Gabriel Genellina
QOTW: "With Lisp or Forth, a master programmer has unlimited power and expressiveness. With Python, even a regular guy can reach for the stars." - Raymond Hettinger web2py vs. Django comparison: http://groups.google.com/group/comp.lang.python/t/b014b89ede34dc27/ The risks of

multivariable assignment

2009-12-31 Thread davidj411
I am not sure why this behavior is this way. at beginning of script, i want to create a bunch of empty lists and use each one for its own purpose. however, updating one list seems to update the others. >>> a = b = c = [] >>> a.append('1') >>> a.append('1') >>> a.append('1') >>> c ['1', '1', '1'] >

Re: multivariable assignment

2009-12-31 Thread J
On Thu, Dec 31, 2009 at 11:13, davidj411 wrote: > I am not sure why this behavior is this way. > at beginning of script, i want to create a bunch of empty lists and > use each one for its own purpose. > however, updating one list seems to update the others. > a = b = c = [] a.append('1')

Re: Cookies

2009-12-31 Thread Victor Subervi
On Thu, Dec 31, 2009 at 1:10 AM, Carsten Haese wrote: > Victor Subervi wrote: > > You know, neither one of those tutorials I followed gave clear, or any, > > instruction about putting a > > print cookie > > statement in the header! How misleading! > > Don't blame the tutorials for your failure to

Re: Bare Excepts

2009-12-31 Thread Victor Subervi
On Wed, Dec 30, 2009 at 11:00 PM, Steve Holden wrote: > Victor Subervi wrote: > > On Wed, Dec 30, 2009 at 3:29 PM, Ben Finney > > > > > > wrote: > > > > samwyse mailto:samw...@gmail.com>> writes: > > > > > I inherited some code that used bare except

Re: multivariable assignment

2009-12-31 Thread Andreas Waldenburger
On Thu, 31 Dec 2009 08:13:35 -0800 (PST) davidj411 wrote: > I am not sure why this behavior is this way. > at beginning of script, i want to create a bunch of empty lists and > use each one for its own purpose. > however, updating one list seems to update the others. > > >>> a = b = c = [] No, y

Not Incrementing

2009-12-31 Thread Victor Subervi
Hi; This "pseudo-code" snippet was given to me by Dennis on this list (whose last name escapes me): def printTree(allTrees, level=0): tree = [] for aTree in allTrees: for name in sorted(aTree.keys()): tree.append("%s%s" % ("\t" * level, name)) printTree(aTree[name], level + 1)

Re: Dynamic text color

2009-12-31 Thread John Posner
On Thu, 31 Dec 2009 10:24:44 -0500, Dave McCormick wrote: John, Thank you for the tips. I was changing the line-column index to a FLOAT because the search would return the starting position (pos) of the string, then by making it a FLOAT and adding the string length I was able to get the en

Instantiate an object based on a variable name

2009-12-31 Thread Wells
Sorry, this is totally basic, but my Google-fu is failing: I have a variable foo. I want to instantiate a class based on its value- how can I do this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Length of an Unsized Object

2009-12-31 Thread Stephen Hansen
On Thu, Dec 31, 2009 at 8:09 AM, Victor Subervi wrote: > Hi; > I have this code: > > sql = 'describe %s %s;' % (optionsStore, option) > print sql > cursor.execute(sql) > descr = cursor.fetchone() > if len(descr) is not None: > > Python complains: > > *TypeEr

Re: Instantiate an object based on a variable name

2009-12-31 Thread Martin P. Hellwig
Wells wrote: Sorry, this is totally basic, but my Google-fu is failing: I have a variable foo. I want to instantiate a class based on its value- how can I do this? My crystal ball is failing too, could you please elaborate on what exactly you want to do, some pseudo code with the intended res

Re: Instantiate an object based on a variable name

2009-12-31 Thread Stephen Hansen
On Thu, Dec 31, 2009 at 8:54 AM, Wells wrote: > Sorry, this is totally basic, but my Google-fu is failing: > > I have a variable foo. I want to instantiate a class based on its > value- how can I do this? It sort of depends on where these classes are. If they're in the current namespace/module,

Re: Length of an Unsized Object

2009-12-31 Thread Victor Subervi
On Thu, Dec 31, 2009 at 12:01 PM, Stephen Hansen wrote: > On Thu, Dec 31, 2009 at 8:09 AM, Victor Subervi > wrote: > >> Hi; >> I have this code: >> >> sql = 'describe %s %s;' % (optionsStore, option) >> print sql >> cursor.execute(sql) >> descr = cursor.fetchone()

Re: Length of an Unsized Object

2009-12-31 Thread MRAB
Victor Subervi wrote: Hi; I have this code: sql = 'describe %s %s;' % (optionsStore, option) print sql cursor.execute(sql) descr = cursor.fetchone() if len(descr) is not None: Python complains: *TypeError*: len() of unsized object Please advise how to r

Re: Instantiate an object based on a variable name

2009-12-31 Thread Diez B. Roggisch
Wells schrieb: Sorry, this is totally basic, but my Google-fu is failing: I have a variable foo. I want to instantiate a class based on its value- how can I do this? class Foo(object): pass ze_class = Foo f = ze_class() Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Instantiate an object based on a variable name

2009-12-31 Thread Steven D'Aprano
On Thu, 31 Dec 2009 08:54:57 -0800, Wells wrote: > Sorry, this is totally basic, but my Google-fu is failing: > > I have a variable foo. I want to instantiate a class based on its value- > how can I do this? The right way to do it is like this: >>> class C: ... pass ... >>> foo = C # assi

Re: Length of an Unsized Object

2009-12-31 Thread Dave Angel
Victor Subervi wrote: Hi; I have this code: sql = 'describe %s %s;' % (optionsStore, option) print sql cursor.execute(sql) descr = cursor.fetchone() if len(descr) is not None: Python complains: *TypeError*: len() of unsized object Please advise how to r

Re: Not Incrementing

2009-12-31 Thread MRAB
Victor Subervi wrote: Hi; This "pseudo-code" snippet was given to me by Dennis on this list (whose last name escapes me): def printTree(allTrees, level=0): tree = [] for aTree in allTrees: for name in sorted(aTree.keys()): tree.append("%s%s" % ("\t" * level, name)) printTre

Re: Not Incrementing

2009-12-31 Thread Dave Angel
Victor Subervi wrote: Hi; This "pseudo-code" snippet was given to me by Dennis on this list (whose last name escapes me): def printTree(allTrees, level=0): tree = [] for aTree in allTrees: for name in sorted(aTree.keys()): tree.append("%s%s" % ("\t" * level, name)) printTree(

Help getting profile information programmatically

2009-12-31 Thread sawilla
I need to get the cumulative process time for a function that returns arguments and I'm having trouble doing so programmatically. After I get the process time, I want to log it to a file, along with other information. My problem is that I can't figure out how to do this programmatically in a good w

Re: Importing bitly.py in twitter-gedit.py

2009-12-31 Thread Kev Dwyer
On Thu, 31 Dec 2009 10:28:55 +0530, Vikash Dhankar wrote: > Hi, > I am newbie in the python, I am stuck into a small problem. > > Me and my friend are working on the gedit based Twitter plugin. > http://code.google.com/p/gedit-twitter-plugin/ > > Now I want to add the tiny URL thing into this. I

Re: multivariable assignment

2009-12-31 Thread John Posner
On Thu, 31 Dec 2009 11:32:04 -0500, Andreas Waldenburger wrote: On Thu, 31 Dec 2009 08:13:35 -0800 (PST) davidj411 wrote: I am not sure why this behavior is this way. at beginning of script, i want to create a bunch of empty lists and use each one for its own purpose. however, updating one l

Re: Not Incrementing

2009-12-31 Thread Victor Subervi
On Thu, Dec 31, 2009 at 12:19 PM, MRAB wrote: > Victor Subervi wrote: > >> Hi; >> This "pseudo-code" snippet was given to me by Dennis on this list (whose >> last name escapes me): >> >> def printTree(allTrees, level=0): >> tree = [] >> for aTree in allTrees: >>for name in sorted(aTree.keys

Re: Dangerous behavior of list(generator)

2009-12-31 Thread Tom Machinski
On Wed, Dec 30, 2009 at 4:01 PM, Steven D'Aprano wrote: > On Wed, 30 Dec 2009 15:18:11 -0800, Tom Machinski wrote: >> Bottom line, I'm going to have to remove this pattern from my code: >> >>   foo = (foo for foo in foos if foo.bar).next() > > I don't see why. What's wrong with it? Unless you embe

Re: Not Incrementing

2009-12-31 Thread Victor Subervi
On Thu, Dec 31, 2009 at 1:01 PM, Dave Angel wrote: > Victor Subervi wrote: > >> Hi; >> This "pseudo-code" snippet was given to me by Dennis on this list (whose >> last name escapes me): >> >> def printTree(allTrees, level=0): >> tree = [] >> for aTree in allTrees: >>for name in sorted(aTree

Re: Help getting profile information programmatically

2009-12-31 Thread Mike Driscoll
On Dec 31, 12:32 pm, sawilla wrote: > I need to get the cumulative process time for a function that returns > arguments and I'm having trouble doing so programmatically. After I > get the process time, I want to log it to a file, along with other > information. My problem is that I can't figure ou

Re: Dangerous behavior of list(generator)

2009-12-31 Thread Tom Machinski
On Thu, Dec 31, 2009 at 1:54 AM, Peter Otten <__pete...@web.de> wrote: > Somewhat related in 2.6 there's the next() built-in which accepts a default > value. You can provide a sentinel and test for that instead of using > try...except: Thanks. This can be useful in some of the simpler cases. As yo

Re: whoops: create a splash window in python

2009-12-31 Thread Mike Driscoll
On Dec 30, 11:31 pm, Ron Croonenberg wrote: > sorry about posting with the wrong subject... > > * > hello, > > is there a way, in python, to create a splash window and when the > program has completed disappears by sending a msg to it? (I tried > creating two gtk windows but gtk_main doesn't s

Re: Not Incrementing

2009-12-31 Thread MRAB
Victor Subervi wrote: On Thu, Dec 31, 2009 at 1:01 PM, Dave Angel > wrote: [snip] Incidentally, good naming would help to make the code easier to debug. This finalTrees and trees variables don't look to me like you intended them to be trees at all, but list

Re: Not Incrementing

2009-12-31 Thread Victor Subervi
On Thu, Dec 31, 2009 at 3:01 PM, MRAB wrote: > Victor Subervi wrote: > >> On Thu, Dec 31, 2009 at 1:01 PM, Dave Angel > da...@ieee.org>> wrote: >> >> [snip] > > >>Incidentally, good naming would help to make the code easier to >>debug. This finalTrees and trees variables don't look to m

Re: Dangerous behavior of list(generator)

2009-12-31 Thread Stephen Hansen
On Thu, Dec 31, 2009 at 11:42 AM, Tom Machinski wrote: > On Thu, Dec 31, 2009 at 1:54 AM, Peter Otten <__pete...@web.de> wrote: > > Somewhat related in 2.6 there's the next() built-in which accepts a > default > > value. You can provide a sentinel and test for that instead of using > > try...excep

change an exception's message and re-raise it

2009-12-31 Thread Phlip
Pythonistas: I need to do this: try: deep_arcane_layer() except e: e.message = 'the deep arcane layer says: ' + e.message raise e The point is I need to augment that layer's exceptions with extra information that I know about that layer. I naturally cannot use the argless versi

Re: Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?

2009-12-31 Thread Waldemar Osuch
On Dec 30, 10:05 am, kakarukeys wrote: > I tried on a fresh XP on VM. I moved all dlls in C:\WINDOWS\WinSxS > which are in the file handles shown by Process Explorer including the > 3 CRT dlls to the my dist folder and the two subfolders suggested > byhttp://wiki.wxpython.org/py2exe. It didn't wo

Re: change an exception's message and re-raise it

2009-12-31 Thread Stephen Hansen
On Thu, Dec 31, 2009 at 12:18 PM, Phlip wrote: > The point is I need to augment that layer's exceptions with extra > information that I know about that layer. > > I would take advantage of the fact that exceptions are real, full-blown objects, and not just treat them as something that holds a str

Re: Not Incrementing

2009-12-31 Thread Dave Angel
Victor Subervi wrote: On Thu, Dec 31, 2009 at 12:19 PM, MRAB wrote: Victor Subervi wrote: Hi; This "pseudo-code" snippet was given to me by Dennis on this list (whose last name escapes me): def printTree(allTrees, level=0): tree = [] for aTree in allTrees: for name in sorted(aT

Re: Not Incrementing

2009-12-31 Thread MRAB
Victor Subervi wrote: On Thu, Dec 31, 2009 at 3:01 PM, MRAB > wrote: Victor Subervi wrote: On Thu, Dec 31, 2009 at 1:01 PM, Dave Angel mailto:da...@ieee.org> >> wrote: [snip] I

Re: Dynamic text color

2009-12-31 Thread Dave McCormick
Thanks John and Lie, This is supposed to color the word "red" red, "blue" blue, "green" green, etc... The idea is say for a database front end, the search words will be highlighted or colored when the query is returned. Another thing I want to try is a Program editor, something like IDLE. The

Re: change an exception's message and re-raise it

2009-12-31 Thread Cameron Simpson
On 31Dec2009 12:18, Phlip wrote: | Pythonistas: | | I need to do this: | | try: | deep_arcane_layer() | except e: | e.message = 'the deep arcane layer says: ' + e.message | raise e | | The point is I need to augment that layer's exceptions with extra | information that I know a

twenty years ago Guido created Python

2009-12-31 Thread Steve Howell
FYI: http://twitter.com/gvanrossum Python is a truly awesome programming language. Not only is Guido a genius language designer, but he is also a great project leader. What an accomplishment. Congratulations to everybody who has contributed to Python in the last two decades! -- http://mail.p

Re: multiprocessing module

2009-12-31 Thread Aahz
In article <79854c42-b2af-4adb-8967-3dc5e4ac0...@l13g2000yqb.googlegroups.com>, makobu wrote: > >I have a function that makes two subprocess.Popen() calls on a file. > >I have 8 cores. I need 8 instances of that function running in >parallel at any given time till all the files are worked on. >Ca

Re: Memory consumption of multiprocessing.Pool

2009-12-31 Thread Aahz
In article , Wolodja Wentland wrote: > >I have a problem with the memory consumption of multiprocessing.Pool()'s >worker processes. I have a parent process that has to handle big data >structures and would like to use a pool of processes for computations. > >The problem is, that all worker proces

Re: Dangerous behavior of list(generator)

2009-12-31 Thread Tom Machinski
On Thu, Dec 31, 2009 at 12:18 PM, Stephen Hansen wrote: > Hmm? Just use a sentinel which /can't/ exist in the list: then its truly > safe. If the list can contain all the usual sort of sentinels (False, None, > 0, -1, whatever), then just make a unique one all your own. > sentinel = object() > if

Re: change an exception's message and re-raise it

2009-12-31 Thread Steven D'Aprano
On Thu, 31 Dec 2009 12:18:42 -0800, Phlip wrote: > Pythonistas: > > I need to do this: > > try: > deep_arcane_layer() > except e: > e.message = 'the deep arcane layer says: ' + e.message > raise e Use e.args, not e.message. The message attribute is deprecated from Python 2.6 a

mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread W. eWatson
About a year ago, I wrote a program that used mod() for modulo under 2.5. Apparently, % is also acceptable, but the program works quite well. I turned the program over to someone who is using 2.4, and apparently 2.4 knows nothing about mod(). Out of curiosity, what library is mod(a,b)(two args)

Re: Dangerous behavior of list(generator)

2009-12-31 Thread Steven D'Aprano
On Thu, 31 Dec 2009 11:34:39 -0800, Tom Machinski wrote: > On Wed, Dec 30, 2009 at 4:01 PM, Steven D'Aprano > wrote: >> On Wed, 30 Dec 2009 15:18:11 -0800, Tom Machinski wrote: >>> Bottom line, I'm going to have to remove this pattern from my code: >>> >>>   foo = (foo for foo in foos if foo.bar)

Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread Steven D'Aprano
On Thu, 31 Dec 2009 17:30:20 -0800, W. eWatson wrote: > About a year ago, I wrote a program that used mod() for modulo under > 2.5. Apparently, % is also acceptable, but the program works quite well. > I turned the program over to someone who is using 2.4, and apparently > 2.4 knows nothing about

Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread Jan Kaliszewski
01-01-2010 o 02:30:20 W. eWatson wrote: About a year ago, I wrote a program that used mod() for modulo under 2.5. Apparently, % is also acceptable, but the program works quite well. I turned the program over to someone who is using 2.4, and apparently 2.4 knows nothing about mod(). Out of

Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread W. eWatson
Steven D'Aprano wrote: On Thu, 31 Dec 2009 17:30:20 -0800, W. eWatson wrote: About a year ago, I wrote a program that used mod() for modulo under 2.5. Apparently, % is also acceptable, but the program works quite well. I turned the program over to someone who is using 2.4, and apparently 2.4 kn

Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread MRAB
W. eWatson wrote: About a year ago, I wrote a program that used mod() for modulo under 2.5. Apparently, % is also acceptable, but the program works quite well. I turned the program over to someone who is using 2.4, and apparently 2.4 knows nothing about mod(). Out of curiosity, what library is mo

Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread MRAB
W. eWatson wrote: Steven D'Aprano wrote: On Thu, 31 Dec 2009 17:30:20 -0800, W. eWatson wrote: About a year ago, I wrote a program that used mod() for modulo under 2.5. Apparently, % is also acceptable, but the program works quite well. I turned the program over to someone who is using 2.4, an

Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread Ben Finney
"W. eWatson" writes: > Steven D'Aprano wrote: > > NameError: name 'mod' is not defined > So where is it? Here are the choices. > import sys, os, glob > import string > from numpy import * If you use ‘from foo import *’ you forfeit any way of saying where a name in your code gets bound. Hence,

Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread Steven D'Aprano
On Fri, 01 Jan 2010 13:48:28 +1100, Ben Finney wrote: > "W. eWatson" writes: > >> Steven D'Aprano wrote: >> > NameError: name 'mod' is not defined > >> So where is it? Here are the choices. import sys, os, glob >> import string >> from numpy import * > > If you use ‘from foo import *’ you forf

Re: change an exception's message and re-raise it

2009-12-31 Thread Alan G Isaac
On 12/31/2009 7:30 PM, Steven D'Aprano wrote: The message attribute is deprecated from Python 2.6 and will print a warning if you try to use it. http://bugs.python.org/issue6844 fwiw, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Exception as the primary error handling mechanism?

2009-12-31 Thread Peng Yu
I observe that python library primarily use exception for error handling rather than use error code. In the article API Design Matters by Michi Henning Communications of the ACM Vol. 52 No. 5, Pages 46-56 10.1145/1506409.1506424 http://cacm.acm.org/magazines/2009/5/24646-api-design-matters/fullte

Re: Exception as the primary error handling mechanism?

2009-12-31 Thread Chris Rebert
On Thu, Dec 31, 2009 at 8:47 PM, Peng Yu wrote: > I observe that python library primarily use exception for error > handling rather than use error code. > > In the article API Design Matters by Michi Henning > > Communications of the ACM > Vol. 52 No. 5, Pages 46-56 > 10.1145/1506409.1506424 > htt

Re: Exception as the primary error handling mechanism?

2009-12-31 Thread Benjamin Kaplan
On Thu, Dec 31, 2009 at 11:47 PM, Peng Yu wrote: > I observe that python library primarily use exception for error > handling rather than use error code. > > In the article API Design Matters by Michi Henning > > Communications of the ACM > Vol. 52 No. 5, Pages 46-56 > 10.1145/1506409.1506424 > ht

Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread W. eWatson
Ben Finney wrote: "W. eWatson" writes: Steven D'Aprano wrote: NameError: name 'mod' is not defined So where is it? Here are the choices. import sys, os, glob import string from numpy import * If you use ‘from foo import *’ you forfeit any way of saying where a name in your code gets boun

Re: multiprocessing module

2009-12-31 Thread Glazner
On Dec 15 2009, 10:56 am, makobu wrote: > I have a function that makes two subprocess.Popen() calls on a file. > > I have 8 cores. I need 8 instances of that function running in > parallel at any given time till all the files are worked on. > Can the multiprocessing module do this? If so, whats th

Re: Not Incrementing

2009-12-31 Thread Victor Subervi
On Thu, Dec 31, 2009 at 3:46 PM, MRAB wrote: > Victor Subervi wrote: > >> On Thu, Dec 31, 2009 at 3:01 PM, MRAB > pyt...@mrabarnett.plus.com>> wrote: >> >>Victor Subervi wrote: >> >>On Thu, Dec 31, 2009 at 1:01 PM, Dave Angel > >

Re: Cookies

2009-12-31 Thread Victor Subervi
I'm curious. Are there other instances where code needs to be inserted into the header as in the print cookie to get it to be baked on the user's PC? TIA, beno -- http://mail.python.org/mailman/listinfo/python-list