Re: Portrait of a "real life" __metaclass__

2007-11-09 Thread Jonathan Gardner
On Nov 9, 7:12 pm, Mark Shroyer <[EMAIL PROTECTED]> wrote: > I guess this sort of falls under the "shameless plug" category, but > here it is: Recently I used a custom metaclass in a Python program > I've been working on, and I ended up doing a sort of write-up on it, > as an example of what a "rea

Re: Returning actual argument expression to a function call?

2007-11-09 Thread Gabriel Genellina
En Sat, 10 Nov 2007 03:03:00 -0300, Paddy <[EMAIL PROTECTED]> escribió: > Hi, > # If I have a function definition > def f1(arg): > global capturecall > if capturecall: > ... > do_normal_stuff(arg) > > # and its later use: > def f2(): > ... > return f1(a and (b or c)) > > # But al

Re: Returning actual argument expression to a function call?

2007-11-09 Thread Steven D'Aprano
On Fri, 09 Nov 2007 22:03:00 -0800, Paddy wrote: > Hi, > # If I have a function definition ... > # The problem is that for my application to work, > # Python newbies would have to write lambda when they > # know they are after the result. I don't understand why you think this is the case. >

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Tim Roberts
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > >Overall, I'd say you don't stand a chance that your proposals will be >adopted. They are minor variations of things that have been proposed & >rejected too often to count - and to be honest: it get's tiresome >beating the same old horses again and

Re: How to link different site-packages to different Python?

2007-11-09 Thread Terry Reedy
"Boris Borcic" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | If your lazyness isn't caused by your impatience, -- http://mail.python.org/mailman/listinfo/python-list

Re: Valgrind and Python

2007-11-09 Thread Terry Reedy
"Esa A E Peuha" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Running Python 2.5.1 under Valgrind is interesting; What platform and compiler and compiler settings? -- http://mail.python.org/mailman/listinfo/python-list

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Terry Reedy
"Paul Boddie" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | I started tracking some of the complaints about Python and comparing | them to Python 3000's supposed remedies. It's interesting reading: | | http://wiki.python.org/moin/PythonWarts For ' Inconsistent/unpredictable compa

Re: Valgrind and Python

2007-11-09 Thread Terry Reedy
| | does that mean that python's interpretor is a memory beast? No. The developers have occasionally run Valgrind on Python (or seen the results of so doing). I believe they have determined that it gives spurious messages due to some particular features of its coding style or standards. See

Returning actual argument expression to a function call?

2007-11-09 Thread Paddy
Hi, # If I have a function definition def f1(arg): global capturecall if capturecall: ... do_normal_stuff(arg) # and its later use: def f2(): ... return f1(a and (b or c)) # I would like to do: capturecall = False result = f2() # And get the equivalent of do_normal_stuff(a and(b o

Re: Python IDE

2007-11-09 Thread rustom
On Nov 10, 8:43 am, [EMAIL PROTECTED] wrote: > On Nov 3, 10:11 pm, Simon Pickles <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I have recently moved from Windows XP to Ubuntu Gutsy. > > > I need a Python IDE and debugger, but have yet to find one as good as > > Pyscripter for Windows. Can anyone recom

Re: Python Extension Building Network

2007-11-09 Thread Gabriel Genellina
En Fri, 09 Nov 2007 13:30:03 -0300, <[EMAIL PROTECTED]> escribió: > On Nov 9, 10:02 am, Tim Golden <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >> > The hardest part was finding accurate information. Most people on the >> > user groups have been unhelpful or sarcastic. >> >> That's a sha

Re: easy 3D graphics for rendering geometry?

2007-11-09 Thread gsal
By the way, VPython crashes my computer rather easily: - launch the editor - open python file - press F5 to run - when the graphical windows first appears, it will be accompanied by a cursor AND a sand watch to indicate that python is busy doing somethin...if before the watch goes away, I attempt

Writing a CGI to query DB

2007-11-09 Thread Bighead
Hi, I am currently working on a CGI deployed on an Apache server, which, given an arbitrary SQL, fetches raw data from a remote DB server and return them in a HTML page. This CGI works fine on quick SQLs. But when I try to run a slow SQL on this CGI, through a Squid Proxy, I always get the Error

Re: [win32] spawn background process and detach it w/o problems

2007-11-09 Thread Gabriel Genellina
En Thu, 08 Nov 2007 11:09:02 -0300, Dmitry Teslenko <[EMAIL PROTECTED]> escribió: > How to write portable (win32, unix) script that launches another > program and continues its execution? Use the subprocess module. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE

2007-11-09 Thread AppZlove
On Nov 3, 10:11 pm, Simon Pickles <[EMAIL PROTECTED]> wrote: > Hi, > > I have recently moved from Windows XP to Ubuntu Gutsy. > > I need a Python IDE and debugger, but have yet to find one as good as > Pyscripter for Windows. Can anyone recommend anything? What are you all > using? > > Coming from

Re: python - stealth window

2007-11-09 Thread Gabriel Genellina
En Thu, 08 Nov 2007 03:23:27 -0300, Adam <[EMAIL PROTECTED]> escribió: > I want create Windows console window in stealth with Python script. I > tried > search on internet but I do not find anything. I want something like this > just it is in C++: > > HWND stealth; /*creating stealth (wind

Re: Using python as primary language

2007-11-09 Thread Waldemar Osuch
On Nov 8, 12:52 am, Michel Albert <[EMAIL PROTECTED]> wrote: > In our company we are looking for one language to be used as default > language. So far Python looks like a good choice (slacking behind > Java). A few requirements that the language should be able cope with > are: > > * Database access

Portrait of a "real life" __metaclass__

2007-11-09 Thread Mark Shroyer
I guess this sort of falls under the "shameless plug" category, but here it is: Recently I used a custom metaclass in a Python program I've been working on, and I ended up doing a sort of write-up on it, as an example of what a "real life" __metaclass__ might do for those who may never have seen su

Re: Valgrind and Python

2007-11-09 Thread annonymous
on 11/10/2007 08:38 AM Esa A E Peuha wrote : > Running Python 2.5.1 under Valgrind is interesting; just starting it and > then pressing Ctrl-D produces this: > > ==27082== ERROR SUMMARY: 713 errors from 56 contexts (suppressed: 10 from 1) > ==27082== malloc/free: in use at exit: 1,243,153 bytes in

Re: Codec lookup fails for bad codec name, blowing up BeautifulSoup

2007-11-09 Thread Waldemar Osuch
On Nov 9, 4:15 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Waldemar Osuch wrote: > >> This is a known bug. It's in the old tracker on SourceForge: > >> [ python-Bugs-960874 ] codecs.lookup can raise exceptions other > >> than LookupError > >> but not in the new tracker. > > > The ne

New Python User Group (Arkansas, USA)

2007-11-09 Thread Greg Lindstrom
We are pleased to announce a Python User Group is forming in Arkansas (USA). The Python ARtists of ARkansas, or PyAR^2 is being created to promote the use of all things Python in the Natural State. While our initial intentions are to concentrate on education, we are open to all ideas. If you liv

Re: Get Only the Last Items in a Traceback

2007-11-09 Thread Gabriel Genellina
En Wed, 07 Nov 2007 01:53:31 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > This works great except for syntax errors. Any idea why your solution > doesn't catch those? > > Here's the output it gives me, followed by the code I'm using (running > in Python 2.5): > > Traceback (most rec

Re: private data stashed in local/global execution context of PyEval_EvalCode disappears down the execution stack

2007-11-09 Thread Gabriel Genellina
En Tue, 06 Nov 2007 23:25:17 -0300, <[EMAIL PROTECTED]> escribió: > i naively created execution context: > PyObject *execcontext = PyDict_New(); > stuffed a handle in it: > PyObject *ih = PyCObject_FromVoidPtr(handle, NULL); > int st= PyDict_SetItemString(res, "interp", ih); What's `r

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Paul Boddie
On 9 Nov, 20:43, Frank Samuelson <[EMAIL PROTECTED]> wrote: > Carl Banks wrote: > > > What you say is correct in principle, but it's senseless to apply it to > > something you use every day, like def. It's like arguing that irregular > > verbs make speech less productive. > > They do for people wh

Re: Python Extension Building Network

2007-11-09 Thread kyosohma
On Nov 9, 5:26 pm, "M.-A. Lemburg" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Nov 9, 8:36 am, Tim Golden <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] wrote: > >>> Hi, > >>> I am trying to get a small group of volunteers together to create > >>> Windows binaries for any Python

ftplib ssl/tls support?

2007-11-09 Thread Giampaolo Rodola'
I noticed that poplib, smtplib, httplib, imaplib and probably others include support for ssl connections. Are there future plans for ftplib ssl/tls support? -- http://mail.python.org/mailman/listinfo/python-list

Re: Valgrind and Python

2007-11-09 Thread Jean-Paul Calderone
On 10 Nov 2007 02:38:57 +0200, Esa A E Peuha <[EMAIL PROTECTED]> wrote: >Running Python 2.5.1 under Valgrind is interesting; just starting it and >then pressing Ctrl-D produces this: > >==27082== ERROR SUMMARY: 713 errors from 56 contexts (suppressed: 10 from 1) >==27082== malloc/free: in use at ex

Valgrind and Python

2007-11-09 Thread Esa A E Peuha
Running Python 2.5.1 under Valgrind is interesting; just starting it and then pressing Ctrl-D produces this: ==27082== ERROR SUMMARY: 713 errors from 56 contexts (suppressed: 10 from 1) ==27082== malloc/free: in use at exit: 1,243,153 bytes in 508 blocks. ==27082== malloc/free: 3,002 allocs, 2,494

Re: Creating installer with external extension modules

2007-11-09 Thread Martin v. Löwis
> Does anyone have any suggestions on the best way to approach this? For the Mac, I recommend to provide precompiled binaries to your users, rather than requiring them to download various source packages, to run your build-it-all script afterwards. To distribute a package on the Mac, you could st

Creating installer with external extension modules

2007-11-09 Thread mhearne808[insert-at-sign-here]gmail[insert-dot-here]com
I'm creating a piece of software which will be used by in-house users. My code will all be written in pure Python; however, it depends heavily on a number of third-party Python modules, many of which have C/C++ dependencies (numpy, scipy, etc.) Installing these packages on my machine involved a m

Re: Using python as primary language

2007-11-09 Thread Rhamphoryncus
On Nov 9, 1:45 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "Martin Vilcans" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > | But that's not what my question was about. It was about whether it > | would make sense to, on the same python installation, select between > | the GIL

Re: easy 3D graphics for rendering geometry?

2007-11-09 Thread gsal
By the way, VPython crashes my computer rather easily: - launch the editor - open python file - press F5 to run - when the graphical windows appears, attempt to manipulate (drag or resize) - the computer looses it... At the end, sometimes, the computer looks like is trying to take care of things

Re: easy 3D graphics for rendering geometry?

2007-11-09 Thread gsal
I actually did look at VPython last weekend. I managed to draw a soccer field, a few players, move them around and even record/play- back playsI was very impressed on how easy it was to learn not only VPython, but Python in the first...I did not know any python, either. I am not quite sure how

Re: defaultdict and dict?

2007-11-09 Thread Raymond Hettinger
On Nov 9, 3:01 am, Davy <[EMAIL PROTECTED]> wrote: > In Python 2.5 document, defaultdict is called high performance > container. From document, we can know defaultdict is subclass of dict. > So, why defaultdict have higher performance than dict? And at what > circumstance, we can make use of such h

Re: easy 3D graphics for rendering geometry?

2007-11-09 Thread gsal
Thanks for the suggestion. I reviewed the documentation and seems pretty complete and fairly compatible. It does have a pretty steep learning curve, though. For somebody like me, totally new in the field, seems rather difficult to start on my ownI guess they want you to buy the training...

Re: Python Extension Building Network

2007-11-09 Thread M.-A. Lemburg
[EMAIL PROTECTED] wrote: > On Nov 9, 8:36 am, Tim Golden <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >>> Hi, >>> I am trying to get a small group of volunteers together to create >>> Windows binaries for any Python extension developer that needs them, >>> much like the package/extension

Re: Codec lookup fails for bad codec name, blowing up BeautifulSoup

2007-11-09 Thread John Nagle
Waldemar Osuch wrote: >> This is a known bug. It's in the old tracker on SourceForge: >> [ python-Bugs-960874 ] codecs.lookup can raise exceptions other >> than LookupError >> but not in the new tracker. > > The new tracker has it too. > http://bugs.python.org/issue960874 How

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Steven D'Aprano
On Fri, 09 Nov 2007 11:41:24 -0500, Frank Samuelson wrote: >> The ideas are >> *never* fully thought out or materialized, and they invariably invite >> scorn from the user community. > > Of course, they're thought out: They're stolen from another language. > Specifically, the language in which

Re: Codec lookup fails for bad codec name, blowing up BeautifulSoup

2007-11-09 Thread Waldemar Osuch
> > This is a known bug. It's in the old tracker on SourceForge: > [ python-Bugs-960874 ] codecs.lookup can raise exceptions other > than LookupError > but not in the new tracker. The new tracker has it too. http://bugs.python.org/issue960874 > > The "resolution" back in

Re: Global variables within classes.

2007-11-09 Thread Donn Ingle
> I guess you mean "instances", not "classes". Yes. > Err...Perhaps a dumb question, but what about passing the "common > objects" to initializers ? > s = Stack() > c = Canvas(s) > t = Thing(s) Okay, I see where you're going. It's better than what I have at the moment. Thanks. \d -- http://m

Re: Binary search tree

2007-11-09 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Hi, > > I have to get list of URLs one by one and to find the URLs that I have > more than one time(can't be more than twice). > > I thought to put them into binary search tree, this way they'll be > sorted and I'll be able to check if the URL already exist. What ab

Re: Global variables within classes.

2007-11-09 Thread Bruno Desthuilliers
Donn Ingle a écrit : >>>I thought this might be a case for multiple inheritance >> >>??? > > Well, in terms of having Canvas and Thing inherit from Stack and thereby > (somehow, not sure how) they would both have access to Stack.stack (a list) > > >>wrt/ all Thing instances having to refer to a

Re: wx.listctrl- insertstringitem not working

2007-11-09 Thread Larry Bates
barronmo wrote: > Newbie with problem. I'm trying to build a multicolumn list control > with wxPython and am having difficulty getting the data from my query > into each column. I'm getting the following error: > > Traceback (most recent call last): > File "/home/mb/PyPrograms/EMRGUI/Selectabl

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Bruno Desthuilliers
Frank Samuelson a écrit : (snip) >> Arbitrary changes to syntax are never going to fly. It's a lost cause. > > > The changes are not arbitrary. Which ones ? > They are logical, consistent, less > arbitrary and thus more productive. For who ? > If such > changes are a lost cause, that is too

Re: wx.listctrl- insertstringitem not working

2007-11-09 Thread kyosohma
On Nov 9, 4:07 pm, barronmo <[EMAIL PROTECTED]> wrote: > Newbie with problem. I'm trying to build a multicolumn list control > with wxPython and am having difficulty getting the data from my query > into each column. I'm getting the following error: > > Traceback (most recent call last): > File

wx.listctrl- insertstringitem not working

2007-11-09 Thread barronmo
Newbie with problem. I'm trying to build a multicolumn list control with wxPython and am having difficulty getting the data from my query into each column. I'm getting the following error: Traceback (most recent call last): File "/home/mb/PyPrograms/EMRGUI/Selectable.py", line 115, in Rep

Re: Global variables within classes.

2007-11-09 Thread Donn Ingle
>> I thought this might be a case for multiple inheritance > ??? Well, in terms of having Canvas and Thing inherit from Stack and thereby (somehow, not sure how) they would both have access to Stack.stack (a list) > wrt/ all Thing instances having to refer to a same Stack instance, > there's a pr

Re: Binary search tree

2007-11-09 Thread D.Hering
On Nov 9, 4:06 pm, [EMAIL PROTECTED] wrote: > Hi, > > I have to get list of URLs one by one and to find the URLs that I have > more than one time(can't be more than twice). > > I thought to put them into binary search tree, this way they'll be > sorted and I'll be able to check if the URL already e

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Bruno Desthuilliers
Frank Samuelson a écrit : > Bruno Desthuilliers wrote: > >> Yes. Python deliberately choosed to be a statement-based language. >> >>> Why not use the = operator like most other assignments? >> >> >> This dead horse has been beaten to hell and back. >> >> Note that as far as I'm concerned, I may li

Re: Binary search tree

2007-11-09 Thread Jake McKnight
What if someone wants to implement, say, Huffman compression? That requires a binary tree and the ability to traverse the tree. I've been looking for some sort of binary tree library as well, and I haven't had any luck. On 11/9/07, Larry Bates <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wro

Re: Binary search tree

2007-11-09 Thread Neil Cerutti
On 2007-11-09, Larry Bates <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: >> I have to get list of URLs one by one and to find the URLs >> that I have more than one time(can't be more than twice). >> >> I thought to put them into binary search tree, this way >> they'll be sorted and I'll be

Re: Binary search tree

2007-11-09 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hi, > > I have to get list of URLs one by one and to find the URLs that I have > more than one time(can't be more than twice). > > I thought to put them into binary search tree, this way they'll be > sorted and I'll be able to check if the URL already exist. > > Couldn

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Cliff Wells
On Thu, 2007-11-08 at 15:00 -0500, Frank Samuelson wrote: > I love Python, and it is one of my 2 favorite > languages. I would suggest that Python steal some > aspects of the S language. In general, I agree that Python has some antiquated concepts at its core (statements being a major one) and th

Binary search tree

2007-11-09 Thread maxim . novak
Hi, I have to get list of URLs one by one and to find the URLs that I have more than one time(can't be more than twice). I thought to put them into binary search tree, this way they'll be sorted and I'll be able to check if the URL already exist. Couldn't find any python library that implements

Re: Using python as primary language

2007-11-09 Thread Terry Reedy
"Martin Vilcans" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | But that's not what my question was about. It was about whether it | would make sense to, on the same python installation, select between | the GIL and fine-grained locks at startup. Because even if the locks | slows d

Codec lookup fails for bad codec name, blowing up BeautifulSoup

2007-11-09 Thread John Nagle
I just had our web page parser fail on "www.nasa.gov". It seems that NASA returns an HTTP header with a charset of ".utf8", which is non-standard. This goes into BeautifulSoup, which blows up trying to find a suitable codec. This happens because BeautifulSoup does this: def _codec(self,

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Terry Reedy
"Frank Samuelson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | My impression was that "consistency" was important to Python. Important, but not over-riding of all else. | "Consistency" improves my productivity because I don't have to | keep referring to the manual. Things wo

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Frank Samuelson
Carl Banks wrote: >> "Consistency" improves my productivity because I don't have to keep >> referring to the manual. Things work the way I expect them to work. > > Really, should we be taking suggestions from someone who needs a manual > to recall the syntax of the def statement? > > What you

Re: Global variables within classes.

2007-11-09 Thread Bruno Desthuilliers
Donn Ingle a écrit : > Hi, > I'm getting myself really confused. I have three classes. Two of them need > to reference the third, like so: > > Canvas ---> Stack <--- Thing > > I am doing this right now: > > s = Stack() > > And then within I am referring directly to the global > variable 's' (a

Global variables within classes.

2007-11-09 Thread Donn Ingle
Hi, I'm getting myself really confused. I have three classes. Two of them need to reference the third, like so: Canvas ---> Stack <--- Thing I am doing this right now: s = Stack() And then within I am referring directly to the global variable 's' (and again from Thing). Now, this works, but i

Re: Python Extension Building Network

2007-11-09 Thread kyosohma
On Nov 9, 12:24 pm, John Nagle <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > > I am trying to get a small group of volunteers together to create > > Windows binaries for any Python extension developer that needs them, > > much like the package/extension builders who volunteer th

Re: Python Extension Building Network

2007-11-09 Thread kyosohma
On Nov 9, 12:24 pm, John Nagle <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > > I am trying to get a small group of volunteers together to create > > Windows binaries for any Python extension developer that needs them, > > much like the package/extension builders who volunteer th

Re: Games on ps2

2007-11-09 Thread Diez B. Roggisch
Charles Tunley schrieb: > Hi I need a list of games on ps2 and I'm in the united states, oklahoma > <*Charli jo*> I'm deeply sorry, we don't post lists of PS2 Games to people from Oklahoma. If you lived in Texas though... then I'm positive I could send you a comprehensive list of PS2 games, toge

Re: Python Extension Building Network

2007-11-09 Thread John Nagle
[EMAIL PROTECTED] wrote: > Hi, > > I am trying to get a small group of volunteers together to create > Windows binaries for any Python extension developer that needs them, > much like the package/extension builders who volunteer their time to > create Linux RPMs. Really good idea. Can

Re: Using python as primary language

2007-11-09 Thread Boris Borcic
Michel Albert wrote: > > What I meant was that one should be able to "draw" a report template. > Basically a graphical user interface for RML in this case. I > personally would opt for writing RML or whatever code myself. But it's > impossible to convice my boss. The dialog usually goes like this:

Re: Python good for data mining?

2007-11-09 Thread Francesc
[I've just seen this thread. Although it might be a bit late, let me state a couple of precisions] On 6 Nov, 03:09, "D.Hering" <[EMAIL PROTECTED]> wrote: > On Nov 5, 10:29 am, Maarten <[EMAIL PROTECTED]> wrote: > > > As forpytables: it is the most elegant programming interface for HDF > > on any

Re: Using python as primary language

2007-11-09 Thread Rhamphoryncus
On Nov 9, 9:14 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > The heavy use of dicts is one of the problems - they're all over the > place and even if you removed the GIL, a "global dict lock" would give > essentially the same effect. And a per-dict lock means that there will > be a *lot* more loc

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Marc 'BlackJack' Rintsch
On Fri, 09 Nov 2007 11:41:24 -0500, Frank Samuelson wrote: >> There are at least 2 posts a month by someone who decides that they >> want to re-wire Python syntax. Usually it's because of some particular >> idiom they're used to in another language, > > And python does not use idioms from other

Re: Games on ps2

2007-11-09 Thread kyosohma
On Nov 9, 11:03 am, Charles Tunley <[EMAIL PROTECTED]> wrote: > Hi I need a list of games on ps2 and I'm in the united states, oklahoma > <*Charli jo*> Then you shouldn't post to a programming user's group. Try sony.com or http://www.playstation.com/ Mike -- http://mail.python.org/mailman/listi

Re: Using python as primary language

2007-11-09 Thread kyosohma
On Nov 9, 4:32 am, Michel Albert <[EMAIL PROTECTED]> wrote: > On Nov 8, 8:55 pm, [EMAIL PROTECTED] wrote: > > > > > On Nov 8, 1:52 am, Michel Albert <[EMAIL PROTECTED]> wrote: > > > > In our company we are looking for one language to be used as default > > > language. So far Python looks like a goo

Games on ps2

2007-11-09 Thread Charles Tunley
Hi I need a list of games on ps2 and I'm in the united states, oklahoma <*Charli jo*> -- http://mail.python.org/mailman/listinfo/python-list

PyCon 2008 - Call for Tutorials

2007-11-09 Thread Greg Lindstrom
Still thinking of presenting a tutorial at PyCon 2008 in Chicago? "Tutorial Day" is March 13th offering 1/2 day classes on just about any topic Python. It's a great way to help others in the community learn more about Python and you get paid ($1000.00 cash money + conference registration; not a ba

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Frank Samuelson
So you like my ideas too! > > There are at least 2 posts a month by someone who decides that they > want to re-wire Python syntax. Usually it's because of some particular > idiom they're used to in another language, And python does not use idioms from other languages? > in other cases it's be

Re: Python Extension Building Network

2007-11-09 Thread kyosohma
On Nov 9, 10:02 am, Tim Golden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > The hardest part was finding accurate information. Most people on the > > user groups have been unhelpful or sarcastic. > > That's a shame to hear. Because you were building on Windows? > Or for some other reas

Re: Expanding the size of wx Frame

2007-11-09 Thread kyosohma
On Nov 8, 11:02 pm, sundarvenkata <[EMAIL PROTECTED]> wrote: > hello all, is there a way to make wxpython frame to expand itself >as we add controls to it Yes. I recommend using sizers. Then you can have the frame fit the widgets it holds using the Fit() command. I think this only appl

Re: Using python as primary language

2007-11-09 Thread Chris Mellon
On Nov 9, 2007 9:54 AM, Martin Vilcans <[EMAIL PROTECTED]> wrote: > > On Nov 9, 2007 10:37 AM, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > > "Martin Vilcans" <[EMAIL PROTECTED]> writes: > > > > >> If by 'this' you mean the global interpreter lock, yes, there are good > > >> technical reasons. All a

Re: Python Extension Building Network

2007-11-09 Thread Tim Golden
[EMAIL PROTECTED] wrote: > The hardest part was finding accurate information. Most people on the > user groups have been unhelpful or sarcastic. That's a shame to hear. Because you were building on Windows? Or for some other reason? (I ask because, even here on the Python lists, reactions like "G

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Chris M
Multi-return value lambda? Just so you know, there is no concept of returning more than one value from a function. def a(): return 1, 2 returns one value - a tuple of (1, 2). lambda: (1, 2) does the same thing. -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a good Python environment

2007-11-09 Thread Fabio Zadrozny
On 07 Nov 2007 08:50:49 -0800, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > "Colin J. Williams" <[EMAIL PROTECTED]> writes: > > Could you elaborate on "lightweight" please? I find PyScripter to be a > > powerful editor/debugger combination. > > > > What functionality does Eclipse have that

[no subject]

2007-11-09 Thread gregory . miller
I will be out of the office starting 11/09/2007 and will not return until 11/12/2007. -- http://mail.python.org/mailman/listinfo/python-list

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Loic Mahe
Frank Samuelson a écrit : > foo = function(x,y) x+y*2 # Example S language code > bar = foo > bar(3,4) > m = lapply( s, foo ) > bb = lapply(s, function(t) t[3]*4 ) Here you want all functions to be lambda functions: you can get something very close to what you want, just like this: foo = lambd

Re: Using python as primary language

2007-11-09 Thread Martin Vilcans
On Nov 9, 2007 10:37 AM, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > "Martin Vilcans" <[EMAIL PROTECTED]> writes: > > >> If by 'this' you mean the global interpreter lock, yes, there are good > >> technical reasons. All attempts so far to remove it have resulted in an > >> interpeter that is substa

Re: Python Extension Building Network

2007-11-09 Thread kyosohma
On Nov 9, 8:36 am, Tim Golden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > > I am trying to get a small group of volunteers together to create > > Windows binaries for any Python extension developer that needs them, > > much like the package/extension builders who volunteer the

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Carl Banks
On Nov 9, 9:52 am, Frank Samuelson <[EMAIL PROTECTED]> wrote: > Bruno Desthuilliers wrote: > > Yes. Python deliberately choosed to be a statement-based language. > > >> Why not use the = operator like most other assignments? > > > This dead horse has been beaten to hell and back. > > > Note that as

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Chris Mellon
On Nov 9, 2007 8:52 AM, Frank Samuelson <[EMAIL PROTECTED]> wrote: > Bruno Desthuilliers wrote: > > > Yes. Python deliberately choosed to be a statement-based language. > > > >> Why not use the = operator like most other assignments? > > > > This dead horse has been beaten to hell and back. > > > >

Re: Closure/binding problem or misunderstanding

2007-11-09 Thread [EMAIL PROTECTED]
On Nov 9, 9:54 am, Boris Borcic <[EMAIL PROTECTED]> wrote: > Yes this is the expected behavior. Both your getpath() functions return the > current value of the single path variable at the time of invocation. Perhaps > this would be the slightest bit clearer if subdir.iteritems() did not provide >

Re: Closure/binding problem or misunderstanding

2007-11-09 Thread [EMAIL PROTECTED]
On Nov 9, 9:49 am, Paul Hankin <[EMAIL PROTECTED]> wrote: > It's behaving as defined though, and the usual work-around is to add a > variable with a default value. > > class path(object): > def __init__(self, **subdirs): > for name, path in subdirs.iteritems(): > def getpat

ANN: pyglet 1.0beta1

2007-11-09 Thread Alex Holkner
Greetings I am pleased to announce the first public beta of pyglet, a cross-platform windowing and multimedia package useful for developing games and other visually-rich applications. http://www.pyglet.org pyglet is written entirely in Python, with no external requirements needed to develop a

Re: Closure/binding problem or misunderstanding

2007-11-09 Thread Boris Borcic
[EMAIL PROTECTED] wrote: > If I run the following code: > > class path(object): > def __init__(self, **subdirs): > for name, path in subdirs.iteritems(): > def getpath(): > return path > setattr(self, name, getpath) > > export = path( > one

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Frank Samuelson
Bruno Desthuilliers wrote: > Yes. Python deliberately choosed to be a statement-based language. > >> Why not use the = operator like most other assignments? > > This dead horse has been beaten to hell and back. > > Note that as far as I'm concerned, I may like an expression-based > Python-insp

Re: Closure/binding problem or misunderstanding

2007-11-09 Thread Paul Hankin
On Nov 9, 2:32 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > If I run the following code: > > class path(object): > def __init__(self, **subdirs): > for name, path in subdirs.iteritems(): > def getpath(): > return path > setattr(self, name,

Re: Python Extension Building Network

2007-11-09 Thread Tim Golden
[EMAIL PROTECTED] wrote: > Hi, > > I am trying to get a small group of volunteers together to create > Windows binaries for any Python extension developer that needs them, > much like the package/extension builders who volunteer their time to > create Linux RPMs. > > The main thing I need are peo

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Duncan Booth
Frank Samuelson <[EMAIL PROTECTED]> wrote: >> It's also not clear how you expect this to work with anything more >> complex than a single expression. How do you handle statements and >> multiple returns? > > >> def foo(x, y): >> L = [] >> try: >> if x[y] % 2: >> print

Closure/binding problem or misunderstanding

2007-11-09 Thread [EMAIL PROTECTED]
If I run the following code: class path(object): def __init__(self, **subdirs): for name, path in subdirs.iteritems(): def getpath(): return path setattr(self, name, getpath) export = path( one = 'this is one', two = 'this is two', ) pr

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Frank Samuelson
Steven D'Aprano wrote: > Why? What benefit do you gain? > >> Define function objects as "function"s, let users put them where they >> want to. Get rid of lambda, get rid of def, only use = for assignments. > > So you remove two keywords. That's a plus. But then you have to create a > WHOLE lo

Python Extension Building Network

2007-11-09 Thread kyosohma
Hi, I am trying to get a small group of volunteers together to create Windows binaries for any Python extension developer that needs them, much like the package/extension builders who volunteer their time to create Linux RPMs. The main thing I need are people willing to test the binaries to make

get the shape of a numpy ndarray in C++ code [boost.python]

2007-11-09 Thread Marc Oldenhof
[sorry is half a post appeared earlier. Bloody Google groups...] Hello, I'm trying to use a numpy array in C++ (win2000) using boost.python. Test code: void test( numeric::array& nsP) { object shape = nsP.getshape(); int rows = extract(shape[0]); int cols = extract(shape[1]); } At firs

email.get_filename() with newline

2007-11-09 Thread Thomas Guettler
Hi, if I use part.get_filename() with the following email part: --_=_NextPart_001_01C81B11.52AB8006 Content-Type: application/vnd.ms-excel; name="=?iso-8859-1?Q?30102007=28aktualisiert=29=5FK=FCndigungen_enviaM=5FErdgas?= =?iso-8859-1?Q?_S=FCds__GmbH=2Exls?=" Content-Disposit

Re: recording sound with python

2007-11-09 Thread Furkan Kuru
try pymedia On Nov 9, 2007 3:57 AM, jesse j <[EMAIL PROTECTED]> wrote: > Hello Everyone, > > I'm new to python. I have worked through some tutorials and played around > with the language a little bit but I'm stuck. > > I want to know how I can make python run a program. More specifically, I > w

Re: parallel csv-file processing

2007-11-09 Thread Paul Boddie
On 9 Nov, 12:02, Paul Rubin wrote: > > Why not pass the disk offsets to the job server (untested): > >n = 1000 >for i,_ in enumerate(reader): > if i % n == 0: >job_server.submit(calc_scores, reader.tell(), n) > > the remote process seeks to the approp

  1   2   >