Roundup Issue Tracker releases 0.8.5 (stable) and 0.9.0b1 (development)

2005-10-07 Thread Richard Jones
Roundup is a simple-to-use and -install issue-tracking system with command-line, web and e-mail interfaces. It is based on the winning design from Ka-Ping Yee in the Software Carpentry Track design competition. The 0.8.5 stable release includes an Argentinian Spanish translation by Ramiro Morales

ABT 0.7

2005-10-07 Thread Maxime Biais
Initial release of ABT 0.7 under QPL license http://dev.artenum.com/projects/abt ABT automates the building of projects by executing the minimum set of commands to update the project like the famous Make. ABT is given a file, called the recipe (filename is abt-recipe.xml), that describes how

py2exe 0.6.3 released

2005-10-07 Thread Jimmy Retzlaff
py2exe 0.6.3 released = py2exe is a Python distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python installation. Console and Windows (GUI) applications, Windows NT services, exe and dll COM servers are

BayPIGgies: October 13, 7:30pm (IronPort)

2005-10-07 Thread Aahz
The next meeting of BayPIGgies will be Thurs, October 13 at 7:30pm at IronPort. Tim Thompson will describe and demonstrate the interaction between Burning Man and Python using two applications, Radio Free Quasar and Ergo. BayPIGgies meetings alternate between IronPort (San Bruno, California) and

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-07 Thread Terry Hancock
On Monday 03 October 2005 03:48 am, Volker Grabsch wrote: Fredrik Lundh wrote: /... snip comment that the natural order is C, X, Y and that programmers that care about readable code will probably want to be extremely careful with this new feature .../ That's also my opinion, but

where to find information about errors/exceptions in socket.py

2005-10-07 Thread mirandacascade
Version of python: 2.4 O/S: Win2K I will be writing some python scripts to do some client-side programming that involves socket.py. I expect that I will be making calls to the following methods/functions: connect_ex() setsockopt() sendall() recv() close() Where can one find information about

py2exe 0.6.3 released

2005-10-07 Thread Jimmy Retzlaff
py2exe 0.6.3 released = py2exe is a Python distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python installation. Console and Windows (GUI) applications, Windows NT services, exe and dll COM servers are

os.access with wildcards

2005-10-07 Thread mike
i'd like to use os.access(path,mode) where path may contain linux style wildcards. i've failed so far. my workaround is the bash command. os.system('[ -e %s ]' % fn ) any suggestions? -- http://mail.python.org/mailman/listinfo/python-list

Re: PyObject_New

2005-10-07 Thread Gerhard Häring
Jeremy Moles wrote: [...] What I'm trying now is the following: PyObject* obj = _PyObject_New(PyType_MyType); obj = PyObject_Init(obj, PyType_MyType); ... return obj; When obj gets back to the interpreter, Python sees it (or rather, it's __repr__) in

Re: os.access with wildcards

2005-10-07 Thread Leif K-Brooks
mike wrote: i'd like to use os.access(path,mode) where path may contain linux style wildcards. os.access(glob.glob(path), mode) -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a British accent...

2005-10-07 Thread DaveM
On Fri, 07 Oct 2005 00:33:43 -, Grant Edwards [EMAIL PROTECTED] wrote: On 2005-10-06, DaveM [EMAIL PROTECTED] wrote: Frankly, I can't watch Shakespeare or movies like the full monty or trainspotting because I can't understand a damn word they say. British talk sounds like gibberish to me for

RE: Build spoofed IP packets

2005-10-07 Thread Payton, Zack
See scapy.py I've completed windows support at this time and am currently testing it, working out some bugs. If you want a copy just ask. I need some testers. It can do almost any packet transmissions you want. (google it) Z -- http://mail.python.org/mailman/listinfo/python-list

Re: Merging sorted lists/iterators/generators into one stream of values...

2005-10-07 Thread Lasse Vågsæther Karlsen
Ok, that one looks more sleak than what I came up with. Couple of things I learn from your solution, please correct me if I misunderstood something: 1. list containing other lists will sort itself based on first element on lists inside ? 2. sort(), pop() is not costly operations Other than that

Re: os.access with wildcards

2005-10-07 Thread mike
thanks Leif. poor question on my part. I had been using glob.glob(path)==[] and was looking for something more readable, hence os.system('[ -e %s ]' % path ) but that doesn't seem like a good idiom for crossplatform. I thought there may either be a way to escape the wildcards, or an

Re: os.access with wildcards

2005-10-07 Thread mike
thanks Leif. poor question on my part. I had been using glob.glob(path)==[] and was looking for something more readable, hence os.system('[ -e %s ]' % path ) but that doesn't seem like a good idiom for crossplatform. I thought there may either be a way to escape the wildcards, or an

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Antoon Pardon
Op 2005-10-06, Diez B. Roggisch schreef [EMAIL PROTECTED]: Suppose we have a typesystem which has the type ANY, which would mean such an object could be any type. You could then have homogenous lists in the sense that all elements should be of the same declared type and at the same time mix

Re: non descriptive error

2005-10-07 Thread Terry Hancock
On Thursday 06 October 2005 11:57 pm, Timothy Smith wrote: i try to run my app and i get this %python DutyShift.py error thats it. thats the error. mya pp was previously working, and i did make some fairly large changes to it, but i'd expect a more descriptive message then just error.

Re: where to find information about errors/exceptions in socket.py

2005-10-07 Thread Steve Holden
[EMAIL PROTECTED] wrote: Version of python: 2.4 O/S: Win2K I will be writing some python scripts to do some client-side programming that involves socket.py. I expect that I will be making calls to the following methods/functions: connect_ex() setsockopt() sendall() recv() close()

Can't extend function type

2005-10-07 Thread Paul Rubin
Oh well. I had wanted to be able to define two functions f and g, and have f*g be the composition of f and g. func_type = type(lambda: None) class composable_function(func_type): ... def __mult__(f,g): ... def c(*args, **kw): ... return f(g(*args, **kw)) ...

Re: non descriptive error

2005-10-07 Thread [EMAIL PROTECTED]
You should tell us more about DutyShift.py, without the code it is very difficult for other people to guess what's going on. -- http://mail.python.org/mailman/listinfo/python-list

ANN: MathDOM 0.5.0 - MathML in Python

2005-10-07 Thread Stefan Behnel
Hi everyone, MathDOM 0.5 is ready for download from SourceForge. http://mathdom.sourceforge.net/ MathDOM is a set of Python modules (using PyXML and pyparsing) that import mathematical terms as a Content MathML DOM. It currently parses MathML and literal infix terms into a DOM and writes out

Re: non descriptive error

2005-10-07 Thread Steve Holden
Timothy Smith wrote: i try to run my app and i get this %python DutyShift.py error thats it. thats the error. mya pp was previously working, and i did make some fairly large changes to it, but i'd expect a more descriptive message then just error. anyidea where i need to start

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Steve Holden
Antoon Pardon wrote: Op 2005-10-06, Diez B. Roggisch schreef [EMAIL PROTECTED]: Suppose we have a typesystem which has the type ANY, which would mean such an object could be any type. You could then have homogenous lists in the sense that all elements should be of the same declared type and at

Re: Python, alligator kill each other

2005-10-07 Thread Duncan Booth
infidel wrote: A 13-foot Burmese python recently burst after it apparently tried to swallow a live 6-foot alligator whole, authorities said. An allegory telling how Python the language really ought to stay slim and lean and not get bloated by incorporating lots of features from other

Re: PyObject_New

2005-10-07 Thread Martin v. Löwis
Jeremy Moles wrote: PyObject* obj = _PyObject_New(PyType_MyType); obj = PyObject_Init(obj, PyType_MyType); ... return obj; The call to PyObject_Init is redundant: _PyObject_New is malloc+init. However, this shouldn't cause any crashes (except in the debug

Re: Controlling who can run an executable

2005-10-07 Thread Magnus Lycka
Cigar wrote: What I want: - the simplest thing that could possibly work! A splash screen that informs the user that it's confidential data, and that unauthorized use will lead to prosecution? Besides, I think it's not the program you need to protect, but the data. Think about that. Who cares

Re: semi-newbie module namespace confusion

2005-10-07 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: The main jist of the problem is that I'm trying add data from one module to a list and a dictionary in another module, and it doesn't seem to stick over there. It's probably best to avoid any circular depentencies, but as long as you make sure you really use your

Re: Python, alligator kill each other

2005-10-07 Thread Roel Schroeven
infidel wrote: By Denise Kalette Associated Press MIAMI - The alligator has some foreign competition at the top of the Everglades food chain, and the results of the struggle are horror-movie messy. A 13-foot Burmese python recently burst after it apparently tried to swallow a live

Re: dcop module under Python 2.4

2005-10-07 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: Hi all, at the end I upgraded to 2.4, but now I am not able to load dcop module (part of the Python-KDE3 bindings). Any help? Install PyKDE for 2.4 Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Paul Rubin
Steve Holden [EMAIL PROTECTED] writes: In other words, you want Python to be strongly-typed, but sometimes you want to allow a reference to be to any object whatsoever. In which case you can't possibly do any sensible type-checking on it, so this new Python+ or whatever you want to call it

Re: When someone from Britain speaks, Americans hear a British accent...

2005-10-07 Thread Steve Holden
DaveM wrote: On Fri, 07 Oct 2005 00:33:43 -, Grant Edwards [EMAIL PROTECTED] wrote: [...] For example: In British English one uses a plural verb when the subject consists of more than one person. Sports teams, government departments, states, corporations etc. are grammatically plural. In

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Brian Quinlan
Paul Rubin wrote: Brian Quinlan [EMAIL PROTECTED] writes: Without a clear idea of the nature of the proposal, it is impossible to assess it's costs and benefits. So could a proponent of optional declarations please provide a more clear proposal? There is no proposal on the table. There's

Re: Can't extend function type

2005-10-07 Thread Diez B. Roggisch
Paul Rubin wrote: Oh well. I had wanted to be able to define two functions f and g, and have f*g be the composition of f and g. func_type = type(lambda: None) class composable_function(func_type): ... def __mult__(f,g): ... def c(*args, **kw): ... return

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Steve Holden
Paul Rubin wrote: Steve Holden [EMAIL PROTECTED] writes: In other words, you want Python to be strongly-typed, but sometimes you want to allow a reference to be to any object whatsoever. In which case you can't possibly do any sensible type-checking on it, so this new Python+ or whatever you

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Paul Rubin
Brian Quinlan [EMAIL PROTECTED] writes: There is no proposal on the table. There's a discussion of how this stuff can work, and whether it's useful. As for how the compiler deals with imported modules, see for example Common Lisp or Haskell or ML--how do they do it? Except that you

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Diez B. Roggisch
Why do you call this a JAVA Object or C void*? Why don't you call it a PYTHON object. It is this kind of reaction that IMO tells most opponents can't think outside the typesystems they have already seen and project the problems with those type systems on what would happen with python should

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Diez B. Roggisch
Paul Rubin wrote: Steve Holden [EMAIL PROTECTED] writes: In other words, you want Python to be strongly-typed, but sometimes you want to allow a reference to be to any object whatsoever. In which case you can't possibly do any sensible type-checking on it, so this new Python+ or whatever you

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Ben Sizer
Paul Rubin wrote: Let's see if I understand what you're saying: C and Java: you get useful type checking except when you declare a reference as type ANY. This is a shortcoming compared to: Python: where you get no useful type checking at all. That is not very convincing

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-07 Thread Robin Becker
As mentioned earlier only a dictator can make such decisions and of course as with many dictatorships the wrong decision is often made. There's no such thing as a benevolent dictatorship. -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: os.access with wildcards

2005-10-07 Thread Fredrik Lundh
Leif K-Brooks wrote: os.access(path,mode) where path may contain linux style wildcards. os.access(glob.glob(path), mode) Traceback (most recent call last): File stdin, line 1, in ? TypeError: access() argument 1 must be string, not list it's not clear from the OP if he wants

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Roy Smith
Ben Sizer [EMAIL PROTECTED] wrote: It's started to get very misleading - Python gives you plenty of type-checking, as we all know, just not at compile-time. There's more to it than just that. Python's type checking is not just not done at compile time, it's done as late in run time as

Re: non descriptive error

2005-10-07 Thread Tomasz Lisowski
Timothy Smith wrote: i try to run my app and i get this %python DutyShift.py error thats it. thats the error. mya pp was previously working, and i did make some fairly large changes to it, but i'd expect a more descriptive message then just error. anyidea where i need to start

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Antoon Pardon
Op 2005-10-07, Steve Holden schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-10-06, Diez B. Roggisch schreef [EMAIL PROTECTED]: Suppose we have a typesystem which has the type ANY, which would mean such an object could be any type. You could then have homogenous lists in the sense that

Re: Question

2005-10-07 Thread contact
Hi, this email address does not exist. Please go to the site and use the correct form to send your message. No one has seen this message. Thanks Matchfinder -- http://mail.python.org/mailman/listinfo/python-list

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Steven D'Aprano
On Fri, 07 Oct 2005 06:01:00 -0400, Roy Smith wrote: There's more to it than just that. Python's type checking is not just not done at compile time, it's done as late in run time as possible. One might call it just-in-time type checking. Well there you go then. Instead of pulling our hair

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Christophe
Roy Smith a écrit : There's more to it than just that. Python's type checking is not just not done at compile time, it's done as late in run time as possible. One might call it just-in-time type checking. It's more of a Nearly too late type checking I would say. Not that I complain but it

Re: New Python book

2005-10-07 Thread Maurice LING
I had the opportunity to glance through the book in Borders yesterday. On the whole, I think it is well covered and is very readable. Perhaps I was looking for a specific aspect, and I find that threads did not get enough attention. Looking at the index pages, the topics on threads (about 4-5

Re: check html file size

2005-10-07 Thread Xah Lee
Xah Lee wrote: « would anyone like to translate the following perl script to Python or Scheme (scsh)?» Here's the Python version. # -*- coding: utf-8 -*- # Python # Wed Oct 5 15:50:31 PDT 2005 # given a dir, report all html file's size. (counting inline images) # XahLee.org import re,

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Fredrik Lundh
Christophe wrote: It's more of a Nearly too late type checking I would say. Not that I complain but it would be great if there were also some automatic type checking to catch a few errors as soon as possible. use assert as the soonest possible point. implementing type gates is trivial, if

recursive function

2005-10-07 Thread mg
Hello, In a recursive function like the following : def foo( j ) : j += 1 while j n : j = foo( j ) return j in found that the recursivity is limited (1000 iterations). Then, I have two questions : - why this mecanism has been implemented ? - it is possible to increase or remove (and

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Antoon Pardon
Op 2005-10-07, Diez B. Roggisch schreef [EMAIL PROTECTED]: Why do you call this a JAVA Object or C void*? Why don't you call it a PYTHON object. It is this kind of reaction that IMO tells most opponents can't think outside the typesystems they have already seen and project the problems with

Re: When someone from Britain speaks, Americans hear a British accent...

2005-10-07 Thread Steven D'Aprano
On Fri, 07 Oct 2005 09:01:21 +0100, Steve Holden wrote: and yes, I split that infinitive just to annoy any pedants who may be reading *Real* pedants will know that English is not Latin, does not follow the grammatical rules of Latin, and that just because split infinitives are impossible --

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Christophe
Fredrik Lundh a écrit : Christophe wrote: It's more of a Nearly too late type checking I would say. Not that I complain but it would be great if there were also some automatic type checking to catch a few errors as soon as possible. use assert as the soonest possible point. implementing

Re: py2exe 0.6.3 released

2005-10-07 Thread could ildg
Nice job~Thank you.On 10/7/05, Jimmy Retzlaff [EMAIL PROTECTED] wrote: py2exe 0.6.3 released=py2exe is a Python distutils extension which converts Python scriptsinto executable Windows programs, able to run without requiring aPython installation. Console and Windows (GUI)

Re: recursive function

2005-10-07 Thread Juho Schultz
mg wrote: Hello, In a recursive function like the following : def foo( j ) : j += 1 while j n : j = foo( j ) return j in found that the recursivity is limited (1000 iterations). Then, I have two questions : - why this mecanism has been implemented ? - it is possible to

Re: When someone from Britain speaks, Americans hear a British accent...

2005-10-07 Thread Richie Hindle
[Steve] and yes, I split that infinitive just to annoy any pedants who may be reading [Steven] *Real* pedants will know that English is not Latin, does not follow the grammatical rules of Latin, and that just because split infinitives are impossible -- not forbidden, impossible -- in Latin

Re: recursive function

2005-10-07 Thread Brandon K
Is there no way to implement your idea in a classical loop? Usually the syntax is cleaner, and there is no limit (except the limit of the range function in certain cases). For example what would be wrong with. def foo(j): while j n: j+=1 return j I don't know much about

Re: recursive function

2005-10-07 Thread Brandon K
def foo(j): while j n: j+=1 return j of course I mean: def foo(j): while j n: j+=1 return j sorry == Posted via Newsgroups.com - Usenet Access to over 100,000 Newsgroups == Get Anonymous, Uncensored, Access to West and East Coast Server Farms!

Re: divide

2005-10-07 Thread Andrew Gwozdziewycz
Do the divisions have to be themselves rectangles? xB_C___x x_Ax would be a representation of the problem? However, though, I think that what you mean with your Points being smaller

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Paul Rubin
Fredrik Lundh [EMAIL PROTECTED] writes: use assert as the soonest possible point. implementing type gates is trivial, if you think you need them. What this is about (to me at least) is the edit-debug cycle. Let's say I write some Python code, using assert to validate datatypes. Maybe I've

Re: New Python book

2005-10-07 Thread Jeremy Jones
Maurice LING wrote: I had the opportunity to glance through the book in Borders yesterday. On the whole, I think it is well covered and is very readable. Perhaps I was looking for a specific aspect, and I find that threads did not get enough attention. Looking at the index pages, the topics on

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Diez B. Roggisch
Antoon Pardon wrote: Then argue against my ideas, and not your makings of it. If I just use 'ANY' and you fill that in with C void* like implementation and argue against that, then you are arguing against your own ghosts, but not against what I have in mind. Well, you didn't tell us what

Re: Python recipes: list mixin, improved timeit, etc

2005-10-07 Thread Steven D'Aprano
On Thu, 06 Oct 2005 21:03:33 -0700, barnesc wrote: I added some recipes to the Python Cookbook: - listmixin Use ListMixin to create custom list classes from a small subset of list methods: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440656 That looks great. Now,

Python interpreter bug

2005-10-07 Thread alainpoint
Hello, I came accross what i think is a serious bug in the python interpreter. Membership testing seems not to work for list of objects when these objects have a user-defined __cmp__ method. It is present in Python 2.3 and 2.4. I don't know about other versions. The following code illustrates

Re: Python recipes: list mixin, improved timeit, etc

2005-10-07 Thread Michele Simionato
Well, suppose you have a class MyObject and you want to add to it some methods to make its instances into a database. You could put these methods into another class called Storable (the mixin class). Then you can mix MyObject with Storable and get what you want, a class StorableObject inheriting

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Diez B. Roggisch
It is not about falling back on generic declarartion, it is about how such object will be treated. Diez seems to think that strongly-typed language can only deal with generic declarations by using something that allows circumventing the type system. No, I don't - now it's you who makes

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Roy Smith
Paul Rubin http://[EMAIL PROTECTED] wrote: What this is about (to me at least) is the edit-debug cycle. Let's say I write some Python code, using assert to validate datatypes. Maybe I've made 4 errors. I then write a test function and run it. Boom, the first assert fails. I fix the first

Re: Python recipes: list mixin, improved timeit, etc

2005-10-07 Thread Paul Rubin
Steven D'Aprano [EMAIL PROTECTED] writes: That looks great. Now, if only I understood mixins: what are they, and what they are for, and in particular, how they differ from mere subclassing. I'm not sure what you mean by mere subclassing so maybe there is no difference. Mixins are sort of a

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Diez B. Roggisch
Now some of the Python-is-perfect crowd seems to suffer from a Blub paradox (http://c2.com/cgi/wiki?BlubParadox). They see annoying, static typed languages like C and Java, and they see pleasant, dynamically typed languages like Python, and conclude that static types = annoying, when in fact

Re: Python recipes: list mixin, improved timeit, etc

2005-10-07 Thread Paul Rubin
Michele Simionato [EMAIL PROTECTED] writes: Once in a time, I thought mixins where a good idea; now I don't think so since they are too easily abused (see Zope 2) and as a consequence you get spaghetti-inheritance, where you have objects with methods inherited from everywhere. So be very

CSV like file format featured recently in Daily Python URL?

2005-10-07 Thread Alex Willmer
I'm trying to track down the name of a file format and python module, that was featured in the Daily Python URL some time in the last month or two. The format was ASCII with a multiline header defining types for the comma seperated column data below. It may have had the capability to store

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Paul Rubin
Diez B. Roggisch [EMAIL PROTECTED] writes: - FPs share their own set of problems - try writing a server. The have inherent troubles with event-driven programs. Erlang? Still, FP is cool. But python too. And just attaching some type-inference to python won't work. Yeah, I've figured

Re: Continuous system simulation in Python

2005-10-07 Thread François Pinard
[Robert Kern] [...] an ODE integrator would probably want to adaptively select its timesteps as opposed to laying out a uniform discretization upfront. Eons ago, I gave myself such a little beast (but really found in an Appendix of a book on simulation), which I use since then whenever I need

Re: Python recipes: list mixin, improved timeit, etc

2005-10-07 Thread Steven D'Aprano
On Fri, 07 Oct 2005 05:11:00 -0700, Michele Simionato wrote: Well, suppose you have a class MyObject and you want to add to it some methods to make its instances into a database. You could put these methods into another class called Storable (the mixin class). Then you can mix MyObject with

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Diez B. Roggisch
Paul Rubin wrote: Diez B. Roggisch [EMAIL PROTECTED] writes: - FPs share their own set of problems - try writing a server. The have inherent troubles with event-driven programs. Erlang? Guess what, worked with that, too :) And let me assure you - it does have pretty much runtime type

Re: When someone from Britain speaks, Americans hear a British accent...

2005-10-07 Thread Steve Holden
Richie Hindle wrote: [Steve] and yes, I split that infinitive just to annoy any pedants who may be reading [Steven] *Real* pedants will know that English is not Latin, does not follow the grammatical rules of Latin, and that just because split infinitives are impossible -- not

Re: Can Python replace TCL/Expect

2005-10-07 Thread Jorgen Grahn
On Thu, 06 Oct 2005 17:08:03 GMT, Cameron Laird [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Jorgen Grahn [EMAIL PROTECTED] wrote: . . . It depends. I do not feel /that/ advanced, but I've been bitten by pexpect's

Re: Python recipes: list mixin, improved timeit, etc

2005-10-07 Thread Mike Meyer
Steven D'Aprano [EMAIL PROTECTED] writes: On Thu, 06 Oct 2005 21:03:33 -0700, barnesc wrote: I added some recipes to the Python Cookbook: - listmixin Use ListMixin to create custom list classes from a small subset of list methods:

Re: Python recipes: list mixin, improved timeit, etc

2005-10-07 Thread Michele Simionato
Paul Rubin wrote: Yeah, I wonder though how much of that is a result of Python's cavalier approach to multiple inheritance. Does that happen much in CLOS? In Java because of multiple interfaces? I've studied Flavors a little and mix-ins were used in some extensive ways, but maybe programs

Re: Can't extend function type

2005-10-07 Thread Christopher Subich
Diez B. Roggisch wrote: Paul Rubin wrote: Oh well. I had wanted to be able to define two functions f and g, and have f*g be the composition of f and g. func_type = type(lambda: None) class composable_function(func_type): ... def __mult__(f,g): ... def c(*args,

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Steve Holden
Christophe wrote: Fredrik Lundh a écrit : Christophe wrote: It's more of a Nearly too late type checking I would say. Not that I complain but it would be great if there were also some automatic type checking to catch a few errors as soon as possible. use assert as the soonest possible

BayPIGgies: October 13, 7:30pm (IronPort)

2005-10-07 Thread Aahz
The next meeting of BayPIGgies will be Thurs, October 13 at 7:30pm at IronPort. Tim Thompson will describe and demonstrate the interaction between Burning Man and Python using two applications, Radio Free Quasar and Ergo. BayPIGgies meetings alternate between IronPort (San Bruno, California) and

Re: Simple prototype text editor in python

2005-10-07 Thread thakadu
Thanks for everyones advice. I finally went for a very basic BSD style template that I found somewhere. Its really short and easy to understand, at least to me! -- http://mail.python.org/mailman/listinfo/python-list

Re: Book Python and Tkinter Programming

2005-10-07 Thread projecktzero
striker wrote: Does anyone who has this book willing to sell it. Please e-mail me the condition and any other details if you are interested. Thanks, Kevin half.com has a couple of people selling it. One for $35.24 and another for $129.97. --

How to run python scripts with IDLE

2005-10-07 Thread vyzasatya
Hi all, My problem is # I have to run a script which takes a command line parameter which is unicode text # I cant use Windows console as it doesnt support /display unicode # I dont seems to find a way to pass command line arguments to scripts in IDLE. Please suggest me what I can do. Thanks in

Re: Continuous system simulation in Python

2005-10-07 Thread Robert Kern
François Pinard wrote: [Robert Kern] [...] an ODE integrator would probably want to adaptively select its timesteps as opposed to laying out a uniform discretization upfront. Eons ago, I gave myself such a little beast (but really found in an Appendix of a book on simulation), which I use

Python recipes: list mixin, improved timeit, etc

2005-10-07 Thread barnesc
So mixins are just a sub-class [pun intended] of sub-classing? I've just found this: [quote] A mixin class is a parent class that is inherited from - but not as a means of specialization. Typically, the mixin will export services to a child class, but no semantics will be implied about the

Re: Python interpreter bug

2005-10-07 Thread Simon Percivall
Why would it be a bug? You've made it so that every instance of OBJ is equal to every other instance of OBJ. The behaviour is as expected. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python interpreter bug

2005-10-07 Thread Steve Holden
[EMAIL PROTECTED] wrote: Hello, I came accross what i think is a serious bug in the python interpreter. Membership testing seems not to work for list of objects when these objects have a user-defined __cmp__ method. It is present in Python 2.3 and 2.4. I don't know about other versions.

Re: Merging sorted lists/iterators/generators into one stream of values...

2005-10-07 Thread George Sakkis
Lasse Vågsæther Karlsen [EMAIL PROTECTED] wrote: Ok, that one looks more sleak than what I came up with. For the most efficient and elegant solution, check out Raymond Hettinger's reply to: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/141934 George --

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Antoon Pardon
Op 2005-10-07, Diez B. Roggisch schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Then argue against my ideas, and not your makings of it. If I just use 'ANY' and you fill that in with C void* like implementation and argue against that, then you are arguing against your own ghosts, but not

Re: Python interpreter bug

2005-10-07 Thread alainpoint
There is definitely a bug. Maybe the follownig snippet is more clear: class OBJ: def __init__(self,identifier): self.id=identifier self.allocated=0 #def __cmp__(self,other): # return cmp(other.allocated,self.allocated) mylist=[OBJ(i)

Re: Merging sorted lists/iterators/generators into one stream of values...

2005-10-07 Thread Lasse Vågsæther Karlsen
Thanks, that looks like Mike's solution except that it uses the built-in heapq module. While this one contains less code than Mike's solution it seems to lack the ability to control the comparison operation, which means it won't work in my case. I need to both be able to sort on an arbitrary

Re: no variable or argument declarations are necessary.

2005-10-07 Thread Paul Rubin
Diez B. Roggisch [EMAIL PROTECTED] writes: Erlang? Guess what, worked with that, too :) And let me assure you - it does have pretty much runtime type error issues. It's interpreted. Yes, it makes no attempt at being statically typed. It's like Python that way, AFAIK. Easy cases are

Python 2nd favorite language in Linux Journal poll

2005-10-07 Thread beliavsky
Linux Journal annually polls its readers on questions such as their favorite programming language. In the 2005 poll, Python is 2nd, its highest ranking ever. Below are the results by year. I wish that rankings beyond the first 3 were available and that the number of votes were shown. Nerds like

Re: Python interpreter bug

2005-10-07 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: I came accross what i think is a serious bug in the python interpreter. Membership testing seems not to work for list of objects when these objects have a user-defined __cmp__ method. it does not work if they have *your* __cmp__ method, no. if you add a print

Re: When someone from Britain speaks, Americans hear a British accent...

2005-10-07 Thread Richie Hindle
[Richie] Your previous post to this thread was chock-full of split nominatives: The Hollywood voice, the specific regional accent, the English-speaking world, the original French. And you call yourself a grammarian. [Steve] I am presuming this post was meant to be a joke? It was. No

Re: Python interpreter bug

2005-10-07 Thread alainpoint
Sorry Fredrik but I don't understand. Just comment out the assert and you have different results depending on whether an unrelated sort function is defined. This seems weird to me ! -- http://mail.python.org/mailman/listinfo/python-list

Re: Can't extend function type

2005-10-07 Thread Paul Rubin
Diez B. Roggisch [EMAIL PROTECTED] writes: Well - function inheritance is not known so far in python - and in no other language I know. Yeah, I didn't really expect it to work, but it seems like a logical consequence of type/class unification. Basically you want __mult__ being part of f or g

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-07 Thread Eric Nieuwland
Robin Becker wrote: As mentioned earlier only a dictator can make such decisions and of course as with many dictatorships the wrong decision is often made. There's no such thing as a benevolent dictatorship. Ever cared to check what committees can do to a language ;-) --eric --

  1   2   3   >