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

Graphical Engine

2007-11-09 Thread Vlad Dogaru
Hi, A few friends and myself were thinking of writing a graphical engine based on OpenGL. Does Python have the required speed for that task? Are there any examples out there of open-source engines which we can look at? A Google search yielded no interesting results, but then again I'm

Re: Using python as primary language

2007-11-09 Thread Martin Vilcans
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 substantially slower on a single processor. Is there any good technical reason that CPython doesn't use the GIL on single CPU

Re: Creating a cell 'by hand'

2007-11-09 Thread Duncan Booth
Prepscius, Colin \(IT\) [EMAIL PROTECTED] wrote: The last argument to new.function takes a closure, which is a tuple of cell objects. Does anybody know how to create those cell objects 'by hand'? def newcell(): def f(): cell return f.func_closure[0] cell = None

Re: Graphical Engine

2007-11-09 Thread Diez B. Roggisch
Vlad Dogaru schrieb: Hi, A few friends and myself were thinking of writing a graphical engine based on OpenGL. Does Python have the required speed for that task? Are there any examples out there of open-source engines which we can look at? A Google search yielded no interesting results,

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

2007-11-09 Thread Dmitry Teslenko
Hello! On 08/11/2007, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Take a look at the subprocess module. Big thanks! It's interesting what's happening with subprocess.Popen instance after it has been instatiated and script's main thread exits leaving Popen'ed application open. --

Re: Some pythonic suggestions for Python

2007-11-09 Thread Duncan Booth
Scott David Daniels [EMAIL PROTECTED] wrote: To quote a poster at http://www.thescripts.com/forum/thread22741.html, While we are at it, I also don't understand why sequences can't be used as indices. Why not, say, l[[2,3]] or l[(2, 3)]? Why a special slice concept? Isn't that unpythonic?

Re: Some pythonic suggestions for Python

2007-11-09 Thread Duncan Booth
Steven D'Aprano [EMAIL PROTECTED] wrote: Besides, if you want this behaviour, you can add it yourself: class mylist(list): # Untested! def __getitem__(self, index): if type(index) is list: return [self[i] for i in index] return super(mylist,

Re: Graphical Engine

2007-11-09 Thread Karlo Lozovina
Vlad Dogaru wrote: A few friends and myself were thinking of writing a graphical engine based on OpenGL. Does Python have the required speed for that task? Are there any examples out there of open-source engines which we can look at? A Google search yielded no interesting results, but then

Re: Using python as primary language

2007-11-09 Thread Hrvoje Niksic
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 substantially slower on a single processor. Is there any good technical reason that

Re: Using python as primary language

2007-11-09 Thread Michel Albert
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 good choice (slacking behind Java). A few requirements that the language should

Modeling (Re: Pythonic ORM with support for composite primary/foreign keys?)

2007-11-09 Thread Wolfgang Keller
Hello, thanks for the hints towards Elixir and Storm. In fact I would have loved to use Modeling (http://modeling.sourceforge.net/), as it seems to fulfil all my requirements perfectly so far, except the one with the composite keys. In particular I like its proximity to EOF (R.I.P.)

How to link different site-packages to different Python?

2007-11-09 Thread Davy
Hi all, I have Python 2.4 and 2.5 in my PC. And PythonWin is installed as IDE. When I tried to use site-packages Numpy, I installed the both version (i.e. for 2.4 and 2.5). Python 2.4 and Numpy for it work together well. But when I type from numpy import * in Python 2.5. It throw out an error

parallel csv-file processing

2007-11-09 Thread Michel Albert
Currently I am faced with a large computation tasks, which works on a huge CSV file. As a test I am working on a very small subset which already contains 2E6 records. The task itself allows the file to be split however as each computation only involves one line. The application performing the

defaultdict and dict?

2007-11-09 Thread Davy
Hi all, 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 high performance? That is, when use defaultdict

Re: parallel csv-file processing

2007-11-09 Thread Paul Rubin
Michel Albert [EMAIL PROTECTED] writes: buffer = [] for line in reader: buffer.append(line) if len(buffer) == 1000: f = job_server.submit(calc_scores, buffer) buffer = [] f = job_server.submit(calc_scores, buffer) buffer = [] but would this not kill my memory if I

Re: 911 operation by evil JEWS and Mossad

2007-11-09 Thread Tom Potter
On Nov 8, 7:28 pm, philipp neulist [EMAIL PROTECTED] wrote: On Nov 7, 4:08 pm, [EMAIL PROTECTED] wrote: 911 carried out by evil jews and mossadhttp://www.guba.com/watch/2000991770 911 truckload of Explosives on the George WashingtonBridgehttp://www.youtube.com/watch?v=J520P-MD9a0 [...]

Re: defaultdict and dict?

2007-11-09 Thread Hrvoje Niksic
Davy [EMAIL PROTECTED] writes: 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? I don't think the high performance attribute is supposed to mean that it

Re: Graphical Engine

2007-11-09 Thread Vlad Dogaru
Karlo Lozovina wrote: Vlad Dogaru wrote: A few friends and myself were thinking of writing a graphical engine based on OpenGL. Does Python have the required speed for that task? Are there any examples out there of open-source engines which we can look at? A Google search yielded no

Re: parallel csv-file processing

2007-11-09 Thread Marc 'BlackJack' Rintsch
On Fri, 09 Nov 2007 02:51:10 -0800, Michel Albert wrote: Obviously this won't work as you cannot access a slice of a csv-file. Would it be possible to subclass the csv.reader class in a way that you can somewhat efficiently access a slice? An arbitrary slice? I guess not as all records

Re: [OT] Stupid email disclaimers

2007-11-09 Thread Bruno Desthuilliers
Ben Finney a écrit : Prepscius, Colin (IT) [EMAIL PROTECTED] writes: (snip) please destroy and notify sender. Does that mean I should first destroy the sender ? And if so, how could I *then* notify her ?-) (Insert humour regarding different parsings of the grammar in the above.) --

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

2007-11-09 Thread Boris Borcic
Davy wrote: Hi all, I have Python 2.4 and 2.5 in my PC. And PythonWin is installed as IDE. When I tried to use site-packages Numpy, I installed the both version (i.e. for 2.4 and 2.5). Python 2.4 and Numpy for it work together well. But when I type from numpy import * in Python 2.5.

Re: [OT] Stupid email disclaimers

2007-11-09 Thread Marc 'BlackJack' Rintsch
On Fri, 09 Nov 2007 12:58:46 +0100, Bruno Desthuilliers wrote: Ben Finney a écrit : Prepscius, Colin (IT) [EMAIL PROTECTED] writes: (snip) please destroy and notify sender. Does that mean I should first destroy the sender ? And if so, how could I *then* notify her ?-) Ask a medium?

Re: parallel csv-file processing

2007-11-09 Thread Paul Boddie
On 9 Nov, 12:02, Paul Rubin http://[EMAIL PROTECTED] 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 appropriate

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 want to

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 = extractint(shape[0]); int cols = extractint(shape[1]); }

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?=

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

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 functions, 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 lot more

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', )

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 x, y

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 people

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, getpath)

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-inspired

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 = 'this is

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

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

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 your

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. Note that as far

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 far as I'm

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 their time to

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 substantially slower

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 = lambda

[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: 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 PyScripter does

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: 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 Get

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 attempts so far to

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 applies

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 reason? (I

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

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 bad

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

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 good choice

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 --

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: 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 locking and

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 platform

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 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 you

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,

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 their time to

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 their time to

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 class Canvas: I am referring directly to the global variable 's' (and again from Thing). Now, this

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 class Canvas: I am referring directly to the global variable 's'

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 say is

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 work the

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 down

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 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 that

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't find

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 able to

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] wrote:

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 like an

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: 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 exist.

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 pretty

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 module

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

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 bad,

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/Selectable.py,

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 same Stack

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 about a

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 --

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 2004 was

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 I am

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 did you

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 builders who

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: 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 high

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

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: 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 and

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

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

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,

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 exit:

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: 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 extension developer

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 who speak

  1   2   >