ANN: SPE 0.8.1.b Python IDE (complete rewrite for running files)

2005-12-15 Thread spe . stani . be
Release news from http://pythonide.stani.be This release is the result of a complete rewrite of the run system. It's now possible to run multi-threaded applications (like wxPython, gtk, ...) with SPE and still control them through the debugger. Also selected text can be executed in the shell.

Dr. Dobb's Python-URL! - weekly Python news and links (Dec 14)

2005-12-15 Thread Cameron Laird
QOTW: If I feel the need for languages that enforce my design decisions, I know where to find them. - Mike Meyer There's ... unavoidable complexity involved in managing a software distribution composed of third party software packages. At the very least, you've got the original sources and the

ANN: 4Suite XML 1.0b3

2005-12-15 Thread Uche Ogbuji
Today we release 4Suite XML 1.0 beta 3, now available from Sourceforge andftp.4suite.org.As of the last release (1.0b2) 4Suite is split into three separate packages:4Suite XML - XML, XPath, XSLT, related technologies and support libraries 4Suite RDF - RDF processing libraries and stand-alone

Flightdeck-UI Online development release 0.5.0 available

2005-12-15 Thread George Belotsky
The goal of the Flightdeck-UI project is to apply ideas from aircraft instrumentation design to general-purpose user interfaces. The Flightdeck-UI Online 0.5.0 development release focuses on some code cleanup and documentation (mostly based on analysis with pylint) starting from the previous

Re: 0 in [True,False] returns True

2005-12-15 Thread Antoon Pardon
Op 2005-12-14, Grant Edwards schreef [EMAIL PROTECTED]: On 2005-12-14, Antoon Pardon [EMAIL PROTECTED] wrote: Well, as you might argue, I'm not tryng to effect a change in your behaviour, I'm simply trying to point out how it could be made more rational. [...] Or return NaN instead of

Re: 0 in [True,False] returns True

2005-12-15 Thread bonono
Antoon Pardon wrote: Op 2005-12-14, Grant Edwards schreef [EMAIL PROTECTED]: On 2005-12-14, Antoon Pardon [EMAIL PROTECTED] wrote: Well, as you might argue, I'm not tryng to effect a change in your behaviour, I'm simply trying to point out how it could be made more rational. [...]

Re: 0 in [True,False] returns True

2005-12-15 Thread Antoon Pardon
Op 2005-12-14, Mike Meyer schreef [EMAIL PROTECTED]: [EMAIL PROTECTED] writes: Steve Holden wrote: It would be somewhat more self-documenting, but why not just use one name to indicate the state and another, only meaningful in certain states, to indicate the callback? Why should I do that?

Re: Questions about working with character encodings

2005-12-15 Thread garabik-news-2005-05
Kenneth McDonald [EMAIL PROTECTED] wrote: I am going to demonstrate my complete lack of understanding as to going back and forth between character encodings, so I hope someone out there can shed some light on this. I have always depended on the kindness of strangers... :-) I'm playing

Re: How to get the local mac address?

2005-12-15 Thread Steve Holden
[EMAIL PROTECTED] wrote: Frank Millman wrote: [EMAIL PROTECTED] wrote: Sorry that I can't help you in any way but have a question myself. Is there an OS independent way to get this thing(regardless of how to format it) in Python ? I know this may not matter if all you want is Windows but

Re: How to get the local mac address?

2005-12-15 Thread Frank Millman
[EMAIL PROTECTED] wrote: Frank Millman wrote: [EMAIL PROTECTED] wrote: Sorry that I can't help you in any way but have a question myself. Is there an OS independent way to get this thing(regardless of how to format it) in Python ? I know this may not matter if all you want is

Re: IsString

2005-12-15 Thread Steve Holden
Donn Cave wrote: Quoth Mike Meyer [EMAIL PROTECTED]: | Donn Cave [EMAIL PROTECTED] writes: ... The question is whether basically everyone needs to get there, or we can expect the masses to use the language _without understanding it_ in this sense, without understanding the

Re: OO in Python? ^^

2005-12-15 Thread Antoon Pardon
Op 2005-12-14, Christopher Subich schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Suppose we would add type declarations in python. So we could do things like int: a object: b Some people seem to think that this would introduce static typing, but the only effect those staments need

Re: OO in Python? ^^

2005-12-15 Thread Antoon Pardon
Op 2005-12-14, Magnus Lycka schreef [EMAIL PROTECTED]: Christopher Subich wrote: Doesn't work; duck typing is emphatically not subclass-typing. For this system to still work and be as general as Python is now (without having to make all variables 'object's), we'd need true interface

Re: How to get the local mac address?

2005-12-15 Thread bonono
Steve Holden wrote: Why should you want to associate a MAC address with a socket? Each interface has an IP address, and it's that you should be using. Say for example I want to find out the MAC if a particular interface in python. It may well be possible to write Python code that will run on

Re: How to get the local mac address?

2005-12-15 Thread Steve Holden
[EMAIL PROTECTED] wrote: Steve Holden wrote: Why should you want to associate a MAC address with a socket? Each interface has an IP address, and it's that you should be using. Say for example I want to find out the MAC if a particular interface in python. When you are asked why would you

Re: Self-awareness of imported modules? Do they know where they live?

2005-12-15 Thread Dody Suria Wijaya
import os print os.__file__ -- dsw -- http://mail.python.org/mailman/listinfo/python-list

Re: Self-awareness of imported modules? Do they know where they live?

2005-12-15 Thread Martin M.
Hi Heiko, Thanks so much for your help! I just tested it and it works like a charm! Test File 1 -- main.py #!/usr/bin python from lib import being being.location() Test File 2 -- being.py #!/usr/bin/python import os def location(): print os.path.abspath(__file__)

Re: PHP = Perl Improved

2005-12-15 Thread Måns Rullgård
Martin Christensen [EMAIL PROTECTED] writes: Tin == Tin Gherdanarra [EMAIL PROTECTED] writes: Tin Xah Lee wrote: recently i got a project that involves the use of php. In 2 days, i read almost the entirety of the php doc. Finding it a breeze because it is roughly based on Perl, of which i

Re: How to get the local mac address?

2005-12-15 Thread bonono
Steve Holden wrote: [EMAIL PROTECTED] wrote: Steve Holden wrote: Why should you want to associate a MAC address with a socket? Each interface has an IP address, and it's that you should be using. Say for example I want to find out the MAC if a particular interface in python. When

Re: How to get the local mac address?

2005-12-15 Thread Steve Holden
[EMAIL PROTECTED] wrote: Steve Holden wrote: [EMAIL PROTECTED] wrote: Steve Holden wrote: Why should you want to associate a MAC address with a socket? Each interface has an IP address, and it's that you should be using. Say for example I want to find out the MAC if a particular interface

Re: How to get the local mac address?

2005-12-15 Thread bonono
Steve Holden wrote: [EMAIL PROTECTED] wrote: Steve Holden wrote: [EMAIL PROTECTED] wrote: Steve Holden wrote: Why should you want to associate a MAC address with a socket? Each interface has an IP address, and it's that you should be using. Say for example I want to find out the

Re: Developing a network protocol with Python

2005-12-15 Thread Laszlo Zsolt Nagy
Paul Rubin wrote: Laszlo Zsolt Nagy [EMAIL PROTECTED] writes: But how can I transfer pure python objects otherwise? Pyro also uses Pickle and it also transfers bytecode. Pyro in the past used pickle in an insecure way. I'd heard it had been fixed and I didn't realize it still uses

Re: Get rid of recursive call __getattr__

2005-12-15 Thread bruno at modulix
Steve Holden wrote: Peter Otten wrote: Pelmen wrote: class Test: def __getattr__(self, attr): print attr def foo(x): print x t = Test() print t __str__ Traceback (most recent call last): File pyshell#23, line 1, in -toplevel-

Re: efficient 'tail' implementation

2005-12-15 Thread Marius Gedminas
Magnus Lycka wrote: To read the last x bytes of a file, you could do: import os x = 2000 # or whatever... f=open('my_big_file') l=os.fstat(f.fileno()).st_size f.seek(l-x) f.read() You don't need fstat/st_size, you can ask seek to move to an offset relative to the end of the

Re: Python packages on OS X vs Windows

2005-12-15 Thread Roel Schroeven
BartlebyScrivener wrote: I'm curious about this part of the post. Any fluent Pythoners actually happy using Windows XP and, if so, do they use ipython as a kind of bash shell substitute? Other alternatives to compensate for the widely derided command line in windows? I often use cygwin's bash

Re: threading IOError

2005-12-15 Thread Gabriel Genellina
Andrew MacIntyre ha escrito: Gabriel Genellina wrote: File C:\Apps\Python\Lib\threading.py, line 218, in wait remaining = endtime - _time() IOError: [Errno 2] No such file or directory The error appears to be inside the time module, and I can't explain the IOError there.

Python on GP2X (Linux Based Handheld Console)

2005-12-15 Thread Michael Sparks
Hi, I hadn't seen any announcements regarding this, but there's a little device recently released called a GP2X which is a small dual CPU (2x200Mhz) device which runs Linux. Anyway, I thought there might be someone in here interested to hear that python AND pygame have both been ported to it

Re: Windows Services

2005-12-15 Thread Mondal
Hi, Thanks to Peter, now I know how to control an *existing* Windows service and how to run a *python script* as a Windows service. Although these were really useful, my point was different. I have developed a script that monitors a specified folder for changes in the files or folders within it.

Re: How to get the local mac address?

2005-12-15 Thread Steve Holden
[EMAIL PROTECTED] wrote: Steve Holden wrote: [EMAIL PROTECTED] wrote: Steve Holden wrote: [EMAIL PROTECTED] wrote: Steve Holden wrote: Why should you want to associate a MAC address with a socket? Each interface has an IP address, and it's that you should be using. Say for example I

Re: How to get the local mac address?

2005-12-15 Thread bonono
Steve Holden wrote: Nope, but I can make inferences, whose correctness you can choose to lie or tell the truth about. I was merely trying to make the point that your response failed to further anybody's understanding of anything. I'm not really bothered *why* you do what you do. That is nice

Re: Windows Services

2005-12-15 Thread Frank Millman
Mondal wrote: Hi, Thanks to Peter, now I know how to control an *existing* Windows service and how to run a *python script* as a Windows service. Although these were really useful, my point was different. I have developed a script that monitors a specified folder for changes in the files

Re: How to get the local mac address?

2005-12-15 Thread Steve Holden
[EMAIL PROTECTED] wrote: Steve Holden wrote: Nope, but I can make inferences, whose correctness you can choose to lie or tell the truth about. I was merely trying to make the point that your response failed to further anybody's understanding of anything. I'm not really bothered *why* you do

Re: OO in Python? ^^

2005-12-15 Thread Ben Sizer
Antoon Pardon wrote: Op 2005-12-14, Christopher Subich schreef Doesn't work; duck typing is emphatically not subclass-typing. I don't see how that is relevant. For this system to still work and be as general as Python is now (without having to make all variables 'object's), But the

Re: How to get the local mac address?

2005-12-15 Thread bonono
Steve Holden wrote: I'm probably just not reading your responses carefully enough. That is fine, misunderstanding happens all the time. And why I am curious that there is no such thing in Python, it is because of this : http://search.cpan.org/~lds/IO-Interface-0.98/Interface.pm I am learning

PyOpengl text rendering with autocad font

2005-12-15 Thread Marco
I must use text in Opengl, Python This text is for architecture design then I need to use AutoCad fonts (extension .shx). I have two troubles: I don't find a guide, a good program, something for use any kind of fonts in PyOpengl. The nehe tutorial has some bugs in translation to Python. I need to

Re: Which Python web framework is most like Ruby on Rails?

2005-12-15 Thread Ben Sizer
Mike Meyer wrote: [Not sure if this attribution is correct.] Alex Martelli wrote: Because of course if other languages have 1 or two frameworks, python needs a dozen. People keep talking about Python's wealth of web frameworks as if it were a bad thing. I just don't see it. Just like I

Re: Windows Services

2005-12-15 Thread bonono
Steve Holden wrote: Mondal wrote: Hi, Thanks to Peter, now I know how to control an *existing* Windows service and how to run a *python script* as a Windows service. Although these were really useful, my point was different. I have developed a script that monitors a specified

Re: Recommend an E-book Meeting the Following Criteria (Newbie, Long)

2005-12-15 Thread andypurshottam
I reccomend David Mertz's text: http://gnosis.cx/TPiP/ Despite name its more that just text processing, he uses modern (ie, 20 - 30 years old) style of programming in examples, often using library packages, especially parsing tools. Online version is free, but you can pay him buy buying the

Re: How to get the local mac address?

2005-12-15 Thread Jorge Godoy
Steve Holden [EMAIL PROTECTED] writes: [EMAIL PROTECTED] wrote: Steve Holden wrote: Why should you want to associate a MAC address with a socket? Each interface has an IP address, and it's that you should be using. Say for example I want to find out the MAC if a particular interface in

Why and how there is only one way to do something?

2005-12-15 Thread Tolga
As far as I know, Perl is known as there are many ways to do something and Python is known as there is only one way. Could you please explain this? How is this possible and is it *really* a good concept? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on GP2X (Linux Based Handheld Console)

2005-12-15 Thread Peter Hansen
Michael Sparks wrote: I hadn't seen any announcements regarding this, but there's a little device recently released called a GP2X which is a small dual CPU (2x200Mhz) device which runs Linux. Anyway, I thought there might be someone in here interested to hear that python AND pygame have

Re: OO in Python? ^^

2005-12-15 Thread Antoon Pardon
Op 2005-12-15, Ben Sizer schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-12-14, Christopher Subich schreef Doesn't work; duck typing is emphatically not subclass-typing. I don't see how that is relevant. For this system to still work and be as general as Python is now (without

Re: Why and how there is only one way to do something?

2005-12-15 Thread jmdeschamps
Tolga wrote: As far as I know, Perl is known as there are many ways to do something and Python is known as there is only one way. Could you please explain this? How is this possible and is it *really* a good concept? if you 'import this', you get a bit of Python Zen... from which I have

Re: Why and how there is only one way to do something?

2005-12-15 Thread bonono
[EMAIL PROTECTED] wrote: Tolga wrote: As far as I know, Perl is known as there are many ways to do something and Python is known as there is only one way. Could you please explain this? How is this possible and is it *really* a good concept? if you 'import this', you get a bit of

Re: Why and how there is only one way to do something?

2005-12-15 Thread Steve Holden
Tolga wrote: As far as I know, Perl is known as there are many ways to do something and Python is known as there is only one way. Could you please explain this? How is this possible and is it *really* a good concept? Perl's credo is actually There's more than one way to do it, often

Re: Why and how there is only one way to do something?

2005-12-15 Thread Chris Mellon
On 15 Dec 2005 04:32:39 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Tolga wrote: As far as I know, Perl is known as there are many ways to do something and Python is known as there is only one way. Could you please explain this? How is this possible and

Re: iniciante

2005-12-15 Thread Alvaro Figueiredo
At Thursday 15 December 2005 00:33, tetri wrote: alguém recomenda algum material disponível na internet para iniciar os estudos em python? outra coisa, peço que brasileiros (ou ao menos aqueles que me entendem) se identifiquem, assim podemos começar discussões em português mesmo, o que acham?

Re: Why and how there is only one way to do something?

2005-12-15 Thread bonono
Chris Mellon wrote: On 15 Dec 2005 04:32:39 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Tolga wrote: As far as I know, Perl is known as there are many ways to do something and Python is known as there is only one way. Could you please explain

Re: Self-awareness of imported modules? Do they know where they live?

2005-12-15 Thread Simon Brunning
The only self aware Python scripts that I'm aware are the timbot and the effbot. Their sources are available from the PSU website at -- http://mail.python.org/mailman/listinfo/python-list

Re: OO in Python? ^^

2005-12-15 Thread Ben Sizer
Antoon Pardon wrote: Op 2005-12-15, Ben Sizer schreef [EMAIL PROTECTED]: So? I answered a question. That my answer is not usefull for a specific purpose is very well prosible but is AFAIC irrelevant. The point being made was that your declarations such as these: int: a object: b would

Re: Why and how there is only one way to do something?

2005-12-15 Thread Chris Mellon
On 15 Dec 2005 05:08:02 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Chris Mellon wrote: On 15 Dec 2005 04:32:39 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Tolga wrote: As far as I know, Perl is known as there are many ways to do

Re: Why and how there is only one way to do something?

2005-12-15 Thread Steve Holden
[EMAIL PROTECTED] wrote: [...] It is perfectly ok to define coding policy within an organisation, for a project that have more than one developer and things like that. But if the language allows more than one way to do it, people would try if that is what they want and they can. I would say

Re: Why and how there is only one way to do something?

2005-12-15 Thread Terry Hancock
On 15 Dec 2005 05:08:02 -0800 [EMAIL PROTECTED] wrote: I would say that if only one way to do it is the intend, make it into the language and any other way is simply error. Say if ternary operator is not the preferred way, don't have it in the language. If someone find a way to work around

Re: Why and how there is only one way to do something?

2005-12-15 Thread bonono
Chris Mellon wrote: You seem very, very interested in portraying anyone who wants to encourage good style and readability as a language Nazi. I don't appreciate that. You'll notice that I haven't taken the easy way out and told you to go away and play with Perl, right? Noop. My stand is that

Dr. Dobb's Python-URL! - weekly Python news and links (Dec 14)

2005-12-15 Thread Cameron Laird
QOTW: If I feel the need for languages that enforce my design decisions, I know where to find them. - Mike Meyer There's ... unavoidable complexity involved in managing a software distribution composed of third party software packages. At the very least, you've got the original sources and the

Re: Newbie question - deleting records from anydbm database

2005-12-15 Thread Dan M
Now how can I go about deleting that record when it's too old? (untested) try del db[ipAddress] Yep, that did it. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Overlapping Regular Expression Matches With findall()

2005-12-15 Thread Mystilleef
Hello, Is there a simple flag to set to allow overlapping matches for the findall() regular expression method? In other words, if a string contains five occurrences of the string pattern cat, calling findall on the string returns a list containing five cat strings. Is it possible for findall() to

Re: Why and how there is only one way to do something?

2005-12-15 Thread bonono
Steve Holden wrote: This would have the unfortunate side effect of only allowing changes to Python that allowed users to do things which are currently impossible. Since Python is Turing-complete, this would effectively inhibit all further changes to the language. I don't quote understand the

Re: SVG rendering with Python

2005-12-15 Thread Andreas Lobinger
Aloha, richard wrote: Dennis Benzinger wrote: Does anybody know of a SVG rendering library for Python? Google python svg ... to find what? Whishing a happy day LOBI -- http://mail.python.org/mailman/listinfo/python-list

Re: Why and how there is only one way to do something?

2005-12-15 Thread bonono
Terry Hancock wrote: But that is precisely what it does mean -- Python's language design tries to be reasonably minimal: there's usually one fairly easy way to do a task. Unintentionally, there may well be a half-dozen really hard ways to do it. The point of telling this to the potential

Re: How to get the local mac address?

2005-12-15 Thread Grant Edwards
On 2005-12-15, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Why should you want to associate a MAC address with a socket? Each interface has an IP address, and it's that you should be using. Say for example I want to find out the MAC if a particular interface in python. When you are asked why

Re: How to get the local mac address?

2005-12-15 Thread Grant Edwards
On 2005-12-15, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Why should you want to associate a MAC address with a socket? Each interface has an IP address, and it's that you should be using. Say for example I want to find out the MAC if a particular interface in python. When you are asked why

Re: Which Python web framework is most like Ruby on Rails?

2005-12-15 Thread gene tani
Ben Sizer wrote: Mike Meyer wrote: [Not sure if this attribution is correct.] Alex Martelli wrote: Because of course if other languages have 1 or two frameworks, python needs a dozen. woops, that attribution is absolutely *wrong*, DH said that, sorry Alex --

Re: How to get the local mac address?

2005-12-15 Thread bonono
Grant Edwards wrote: On 2005-12-15, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Why should you want to associate a MAC address with a socket? Each interface has an IP address, and it's that you should be using. Say for example I want to find out the MAC if a particular interface in

Re: How to get the local mac address?

2005-12-15 Thread bonono
Grant Edwards wrote: you can read my temper from what I write ? If not, then you should be more careful what you write. such as ? -- http://mail.python.org/mailman/listinfo/python-list

Re: 0 in [True,False] returns True

2005-12-15 Thread Grant Edwards
On 2005-12-15, Antoon Pardon [EMAIL PROTECTED] wrote: Or return NaN instead of raising exception for numeric functions ? Because usually (in my applications anyway) NaN is a perfectly valid value and not an exception case that needs to be handled. I don't see the difference. In my

Re: Which Python web framework is most like Ruby on Rails?

2005-12-15 Thread gene tani
Ben Sizer wrote: Mike Meyer wrote: [Not sure if this attribution is correct.] Alex Martelli wrote: Because of course if other languages have 1 or two frameworks, python needs a dozen. People keep talking about Python's wealth of web frameworks as if it were a bad thing. I just

Re: Why and how there is only one way to do something?

2005-12-15 Thread Ben Sizer
Steve Holden wrote: Would you, say, remove for loops because they could be written as while loops. Don't forget the word obvious that appears in that catchphrase ... Interestingly - and somewhat related to this - the other day I was looking for a do..while or do..until loop in the Python

Re: OO in Python? ^^

2005-12-15 Thread Antoon Pardon
Op 2005-12-15, Ben Sizer schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-12-15, Ben Sizer schreef [EMAIL PROTECTED]: So? I answered a question. That my answer is not usefull for a specific purpose is very well prosible but is AFAIC irrelevant. The point being made was that your

Re: Why and how there is only one way to do something?

2005-12-15 Thread Steve Holden
Chris Mellon wrote: [...] (Am I dating myself? ...) Do we need to know about your love life here? Are you hermaphroditic? If not the relationship will never go anywhere. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC

Re: Why and how there is only one way to do something?

2005-12-15 Thread Steve Holden
[EMAIL PROTECTED] wrote: Steve Holden wrote: This would have the unfortunate side effect of only allowing changes to Python that allowed users to do things which are currently impossible. Since Python is Turing-complete, this would effectively inhibit all further changes to the language. I

tkinter: drop-down widget

2005-12-15 Thread Alex Hunsley
Can anyone recommend some code for creating drop-down menus in tkinter? To be absolutely clear, here's an example of a drop-down: http://www.google.co.uk/preferences?hl=en (see the language selection widget) I've found the odd bit of code here and there, such as:

Re: Why and how there is only one way to do something?

2005-12-15 Thread jmdeschamps
Yes, a shared preferred way. And the same is true of many... Think Haskell, OCaml, Lua, Ruby, Lisp, Smalltalk, Java, C... They all have qualities of some sort, that appeal to some of us. Not all the same, nor to all of us. It's really a question of perspective. In this Python community, one

Re: Why and how there is only one way to do something?

2005-12-15 Thread Gerard Flanagan
Tolga wrote: As far as I know, Perl is known as there are many ways to do something and Python is known as there is only one way. Could you please explain this? How is this possible and is it *really* a good concept? Yes it is a good concept because you can concentrate on Strategy rather

Re: Python packages on OS X vs Windows

2005-12-15 Thread Kevin Walzer
Kenneth McDonald wrote: At the moment I'm doing most of my stuff on a Mac, but I've been considering also getting a Windows laptop. One of the reasons is that I've found it very difficult to get certain Python related things running on the Mac; for example, if one wants to use the most

Re: Why and how there is only one way to do something?

2005-12-15 Thread bonono
Steve Holden wrote: This would have the unfortunate side effect of only allowing changes to Python that allowed users to do things which are currently impossible. Since Python is Turing-complete, this would effectively inhibit all further changes to the language. I don't quote understand the

Re: Why and how there is only one way to do something?

2005-12-15 Thread bonono
Steve Holden wrote: It says that Python is already adequately expressive to allow it to solve all solvable problems: more briefly, Python can already do everything. Hence there is no need to change the language. Of course I use this as a /reductio ad absurdum/ to try to show you the

Re: Why and how there is only one way to do something?

2005-12-15 Thread Steve Holden
Ben Sizer wrote: Steve Holden wrote: Would you, say, remove for loops because they could be written as while loops. Don't forget the word obvious that appears in that catchphrase ... Interestingly - and somewhat related to this - the other day I was looking for a do..while or do..until

Haskell Typeclasses (was Re: OO in Python? ^^)

2005-12-15 Thread Aahz
In article [EMAIL PROTECTED], Alex Martelli [EMAIL PROTECTED] wrote: Right, you can get good genericity with Haskell's typeclasses (I've posted about that often in the past, and desperately and so far unsuccessfully tried to convince Guido to use something close to typeclasses rather than

Re: Why and how there is only one way to do something?

2005-12-15 Thread Carl J. Van Arsdall
[EMAIL PROTECTED] wrote: Would you, say, remove for loops because they could be written as while loops. Don't forget the word obvious that appears in that catchphrase ... If every for usage can be done with while and that while is the preferred way, why not ? As I said, the

Re: tkinter: drop-down widget

2005-12-15 Thread Alex Hunsley
Alex Hunsley wrote: Can anyone recommend some code for creating drop-down menus in tkinter? To be absolutely clear, here's an example of a drop-down: http://www.google.co.uk/preferences?hl=en (see the language selection widget) I've found the odd bit of code here and there, such as:

Re: Why and how there is only one way to do something?

2005-12-15 Thread Aahz
In article [EMAIL PROTECTED], Steve Holden [EMAIL PROTECTED] wrote: (Part of) Python's credo (which you can read in context by typing import this at an interactive command prompt) is There should be one (and preferably only one) way to do it. Actually, I've gotten used to doing

Re: Why and how there is only one way to do something?

2005-12-15 Thread Richie Hindle
[Steve] Since Python is Turing-complete Is there some equivalent of Godwin's Law that we can invoke at this point? 8-) -- Richie Hindle [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Why and how there is only one way to do something?

2005-12-15 Thread Xavier Morel
Aahz wrote: In article [EMAIL PROTECTED], Steve Holden [EMAIL PROTECTED] wrote: (Part of) Python's credo (which you can read in context by typing import this at an interactive command prompt) is There should be one (and preferably only one) way to do it. Actually, I've gotten used

Re: Python packages on OS X vs Windows

2005-12-15 Thread BartlebyScrivener
Mike, I nosed around after reading the posts herein. Have you heard of monad, the new Windows Command Shell in beta? http://www.microsoft.com/downloads/details.aspx?FamilyID=2ac59b30-5a44-4782-b0b7-79fe2efd1280DisplayLang=en http://en.wikipedia.org/wiki/MSH_(shell) Or a better article:

Re: Why and how there is only one way to do something?

2005-12-15 Thread bonono
Carl J. Van Arsdall wrote: Although, obvious to whom is a good question. If you don't know the language very little will be obvious to you, however one who is familiar with python (rtfm) would know which cases should obviously use while and which cases should obviously use for So far, I

Re: Why and how there is only one way to do something?

2005-12-15 Thread Steve Holden
Aahz wrote: In article [EMAIL PROTECTED], Steve Holden [EMAIL PROTECTED] wrote: (Part of) Python's credo (which you can read in context by typing import this at an interactive command prompt) is There should be one (and preferably only one) way to do it. Actually, I've gotten used

Re: Why and how there is only one way to do something?

2005-12-15 Thread bonono
Steve Holden wrote: This would have the unfortunate side effect of only allowing changes to Python that allowed users to do things which are currently impossible. Since Python is Turing-complete, this would effectively inhibit all further changes to the language. I don't quite understand the

Re: Python packages on OS X vs Windows

2005-12-15 Thread Kevin Walzer
Re: package installers: I misspoke. The address for them is http://pythonmac.org/packages/ -- Cheers, Kevin Walzer, PhD WordTech Software - Tame the Terminal http://www.wordtech-software.com sw at wordtech-software.com -- http://mail.python.org/mailman/listinfo/python-list

newbie to python

2005-12-15 Thread exter_c
Hello, How do I find out what modules have been included in my python install? I am having issues with crypt functions not working on ubuntu or redhat but they work on Slackware. Any assistance would be great. Regards, Johhny. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why and how there is only one way to do something?

2005-12-15 Thread Simon Brunning
On 12/15/05, Steve Holden [EMAIL PROTECTED] wrote: Aahz wrote: python -c 'import this' Faster: python -m this So, there's two ways to do it. ;-) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Why and how there is only one way to do something?

2005-12-15 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: Chris Mellon wrote: Any time you want to write something in any way other than the obvious way, ask yourself why? Is it more obvious *to you*, which is a good reason as long as you're only writing code for yourself? Or is it just to be different, or because you think

Re: Binary representation of floating point numbers

2005-12-15 Thread Torsten Bronger
Hallöchen! Sorry for the late response, but the subject didn't catch my attention ... Mike Meyer [EMAIL PROTECTED] writes: [EMAIL PROTECTED] writes: In float mode, the instrument returns a sequence of bits that are exactly the ieee754 number in the case of floats, or just the flags in the

Re: Python packages on OS X vs Windows

2005-12-15 Thread gene tani
Kenneth McDonald wrote: At the moment I'm doing most of my stuff on a Mac, but I've been considering also getting a Windows laptop. One of the reasons is that I've found it very difficult to get certain Python related things running on the Mac; for example, if one wants to use the most

Re: Why and how there is only one way to do something?

2005-12-15 Thread Brian Cully
[EMAIL PROTECTED] wrote: C-programmer learning python : Hi, where is condition ? true : false someone prefer the if/else statement type: Can't you see that the following is much more readable, stupid(well not the exact word but tone in such a way like words of messy or elegant etc.) if

Re: How to get the local mac address?

2005-12-15 Thread mwilliams
Well, that kinda depends on what you want the MAC Address of. Personally (on Unix systems) I simply read from a popen('ifconfig') and use a regular expression to parse out the mac address. Works perfectly. Just my 2¢, Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: ?: in Python

2005-12-15 Thread Dave Hansen
On Wed, 14 Dec 2005 21:16:23 +0100 in comp.lang.python, Lawrence Oluyede [EMAIL PROTECTED] wrote: Il 2005-12-14, Andy Leszczynski [EMAIL PROTECTED] ha scritto: How can do elegantly in Python: if condition: a=1 else: a=2 like in C: a=condition?1:2 There are tons of threads on

Re: newbie to python

2005-12-15 Thread Lawrence Oluyede
Il 2005-12-15, [EMAIL PROTECTED] [EMAIL PROTECTED] ha scritto: How do I find out what modules have been included in my python install? Look in site-packages directory I am having issues with crypt functions not working on ubuntu or redhat but they work on Slackware. Crypt functions? Are u

Re: OO in Python? ^^

2005-12-15 Thread Alex Martelli
[EMAIL PROTECTED] wrote: ... [protocol adaptation]); it's the state of _templates_ in Haskell, specifically, which I was rather dubious about (it may be that I just haven't dug into them deep enough yet, but they do seem not a little convoluted to me, so far). Yup, the templates is

Re: Which Python web framework is most like Ruby on Rails?

2005-12-15 Thread Alex Martelli
gene tani [EMAIL PROTECTED] wrote: Ben Sizer wrote: Mike Meyer wrote: [Not sure if this attribution is correct.] Alex Martelli wrote: Because of course if other languages have 1 or two frameworks, python needs a dozen. woops, that attribution is absolutely *wrong*, DH said

  1   2   3   >