Re: Optional Static Typing - Haskell?

2004-12-26 Thread Donn Cave
Quoth Mike Meyer <[EMAIL PROTECTED]>: | [EMAIL PROTECTED] (Alex Martelli) writes: ... |> But then, the above criticism applies: if interface and implementation |> of a module are tightly coupled, you can't really do fully modular |> programming AND static typing (forget type inferencing...). | | I

Re: Python 3000, zip, *args and iterators

2004-12-26 Thread Steven Bethard
Terry Reedy wrote: "Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I guess the point of my question is to find out if this kind of nice interaction of *args and iterators is something that's in the road-map. If it is, then maybe there are parts of it that could be i

Re: Python 3000, zip, *args and iterators

2004-12-26 Thread Terry Reedy
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Terry Reedy wrote: >> I think it worth repeating that Python 3 is at yet something of a >> pipedream, as indicated by the joke name Python 3000 > Right, though my understanding of PEP 3000[1] is that though "Python

Re: list addition methods compared.

2004-12-26 Thread Terry Reedy
"Ishwor" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] If you are curious about the detailed behavior of the CPython implementation, the dis module is one aid. Compare >>> def f1(l): ... l.extend([1]) ... return l ... >>> def f2(l): ... l += [1] ... return l ... >>> impo

Re: WxButton

2004-12-26 Thread M.E.Farmer
LutherRevisited wrote: > Yes I have actually, I still can't figure out how to have my application detect > if a control has focus. If I could, I could just use the keydown event with an > if statement to push my button when it has focus and enter is pressed. I am gonna try and explain how to fish

Re: program in interactive mode

2004-12-26 Thread John Machin
Mike Meyer wrote: > > I've discovered a truly elegant trick with python programs that > interpret other data. Q0. Other than what? > You make them ignore lines that start with # at > the beginning of the line, Q1. After the first user accidentally gets a # at the start of a real data line, a fe

Re: WxButton

2004-12-26 Thread LutherRevisited
Disregard all my posts on this thread, I just downloaded Boa-constructor which has WxDialogs making my life so much simpler. Thanks for all the help though. I was using SPE which uses WxGlade to make gui's, which isn't so bad if you're familiar with the way Java works on GUIs that is, but Boa-Con

Re: Detecting if a program is currently running.

2004-12-26 Thread Mike Meyer
Brian <[EMAIL PROTECTED]> writes: > On a Slackware 9.1 box, I'm trying to detect if mpg123 is currently > running/playing a song so that when the song is done, it'll play the next > in the list. The problem is that popen'ing ps doesn't always give a > correct return. My function is below and

Re: A Revised Rational Proposal

2004-12-26 Thread Steven Bethard
Mike Meyer wrote: "John Roth" <[EMAIL PROTECTED]> writes: I'd suggest making them public rather than either protected or private. There's a precident with the complex module, where the real and imaginary parts are exposed as .real and .imag. This isn't addressed in the PEP, and is an oversight on

Re: program in interactive mode

2004-12-26 Thread Mike Meyer
"B.G.R." <[EMAIL PROTECTED]> writes: > Hi all, > > I'm working on an interpreter for a university subject, which is programmed > in python under linux. > I got most of the work done and I'm just trying to settle some problems I've > found on my way. > Right now, the most important is reading the u

Re: Improving Python (was: Lambda going out of fashion)

2004-12-26 Thread Mike Meyer
[EMAIL PROTECTED] (Aahz) writes: > While I'm in complete agreement about the "".join() construct on the > basis of looks, I have come to appreciate the fact that I *never* mess up > the order of arguments any more. Yeah. When I needed joinable arrays of strings in Eiffel, I added them to the ARRA

Re: Improving Python (was: Lambda going out of fashion)

2004-12-26 Thread Dima Dorfman
On 2004-12-26, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > string methods are nice, but nothing groundbreaking, and their niceness is > almost entirely offset by the horrid "".join(seq) construct that keeps popping > up when people take the "the string module is deprecated" yada yada too > seriously

Re: A Revised Rational Proposal

2004-12-26 Thread Mike Meyer
Nick Coghlan <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> Regarding str() and repr() behaviour, Ka-Ping Yee proposes that repr() have >> the same behaviour as str() and Tim Peters proposes that str() behave like >> the >> to-scientific-string operation from the Spec. > > This looks like a C

Re: A Revised Rational Proposal

2004-12-26 Thread Mike Meyer
"John Roth" <[EMAIL PROTECTED]> writes: > I'd suggest making them public rather than either protected or > private. There's a precident with the complex module, where > the real and imaginary parts are exposed as .real and .imag. This isn't addressed in the PEP, and is an oversight on my part. I'

Re: Optional Static Typing

2004-12-26 Thread Robert Kern
Luis M. Gonzalez wrote: Robert Kern wrote: Automatic type inferencing is great, but sometimes the inference is "object". Being able to supply more information about types helps Starkiller keep the inferences tight and specific. Hmm... I'm not an expert in this subject at all, but I think that when

Re: A Revised Rational Proposal

2004-12-26 Thread Mike Meyer
"Dan Bishop" <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> This version includes the input from various and sundry people. > Thanks >> to everyone who contributed. >> >>> >> PEP: XXX >> Title: A rational number module for Python > ... >> Implementation >> == >> >> There is cur

Re: Optional Static Typing - Haskell?

2004-12-26 Thread Mike Meyer
[EMAIL PROTECTED] (Alex Martelli) writes: > Mike Meyer <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] (Alex Martelli) writes: >> > Mind you, I personally _like_ the concept of describing >> > an interface separately, even in a different language (Corba's IDL, say) >> > that's specialized for the

Re: Complementary language?

2004-12-26 Thread Mike Meyer
[EMAIL PROTECTED] (Alex Martelli) writes: > Objective-C is cool... on the Mac; I'm not sure how well-supported it is > elsewhere, though. In addition to C's advantages, it would let you make > Cocoa GUIs on the Mac easily (with PyObjC &c). But then, the right way > to study Obj-C from scratch is

Re: Are tuple really immutable?

2004-12-26 Thread John Roth
"Chris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi 3) In this example, is t considered mutable or not? "Tuple are immutable" says the doc, but: t[0].append(0) t ([1, 0], [2]) The tuple is immutable but its elements can be mutable: I tend to think that it means that the tuple is

Re: WxButton

2004-12-26 Thread LutherRevisited
Yes I have actually, I still can't figure out how to have my application detect if a control has focus. If I could, I could just use the keydown event with an if statement to push my button when it has focus and enter is pressed. -- http://mail.python.org/mailman/listinfo/python-list

Re: embedding: forcing an interpreter to end

2004-12-26 Thread dan charnitsky
>> I may need to reconsider if Python is appropriate; >> the other possibiities are javascript or lua. > Lisp/Scheme? > (See http://tinyscheme.sourceforge.net/download.html Thanks for the pointer. After some preliminary evaluation, I'll probably try to move forward prototyping with Lua. I't look

Detecting if a program is currently running.

2004-12-26 Thread Brian
On a Slackware 9.1 box, I'm trying to detect if mpg123 is currently running/playing a song so that when the song is done, it'll play the next in the list. The problem is that popen'ing ps doesn't always give a correct return. My function is below and I added a second check that runs 1 second

Are tuple really immutable?

2004-12-26 Thread Chris
Hi Consider the following tuples: >>> t = ([1],[2]) >>> u = (1,2) >>> v = ('1','2') >>> t ([1], [2]) >>> u (1, 2) >>> v ('1', '2') >>> t.__hash__() Traceback (most recent call last): File "", line 1, in ? TypeError: list objects are unhashable >>> u.__hash__() 219750523 >>> v.__hash__() -178688109

Re: Windows XP - cron or scheduler for Python?

2004-12-26 Thread Esmail Bonakdarian
[EMAIL PROTECTED] wrote: Hi Esmail, Kirby Alarm is written in Clarion. Sorry, but I want to keep the source code to myself. Hi, thanks for the info, and no problem. I'm learning Python, and looking at other's code has been a great way to learn. (As an aside, I was thinking of this sort of applicati

Re: Python on Linux

2004-12-26 Thread Nick Coghlan
Paul Rubin wrote: "Austin" <[EMAIL PROTECTED]> writes: On Red Hat 9, Python is installed by default and it's version is 2.2.2 If I want to upgrade Python to 2.3.4(newer version), how could I do? If I compile source code of Python, how do I uninstall the old version? I tried rpm packages but failed

Re: WxButton

2004-12-26 Thread Kartic
Have you explored the wxPython Demo application? It is a pretty helpful learning tool. -- http://mail.python.org/mailman/listinfo/python-list

Re: methods of addition in Python

2004-12-26 Thread Nick Coghlan
Ishwor wrote: As my earlier mail didn't make it c.l.py because it had the heading "LIST Addition compared", probably it was blocked by the mail server. ;-) The original made it - just remember that Usenet and mailing lists aren't instant messaging. It can take time for things to show up :) Cheers

Re: A Revised Rational Proposal

2004-12-26 Thread Nick Coghlan
Dan Bishop wrote: Mike Meyer wrote: This version includes the input from various and sundry people. Thanks to everyone who contributed. PEP: XXX Title: A rational number module for Python ... Implicit Construction - When combined with a floating type - either complex or float

Re: Tricks to install/run Python on Windows ?

2004-12-26 Thread It's me
Try running with the latest version of Python 2.3 instead of 2.4. May be you would have better luck. I've found similar stability problems with some of the tools (eventhough they have 2.4 releases) as well. I switched back to 2.3 and so far I have no complains. "StepH" <[EMAIL PROTECTED]> wr

Re: Windows XP - cron or scheduler for Python?

2004-12-26 Thread ian
Hi Esmail, Kirby Alarm is written in Clarion. Sorry, but I want to keep the source code to myself. Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: A Revised Rational Proposal

2004-12-26 Thread Nick Coghlan
Mike Meyer wrote: Regarding str() and repr() behaviour, Ka-Ping Yee proposes that repr() have the same behaviour as str() and Tim Peters proposes that str() behave like the to-scientific-string operation from the Spec. This looks like a C & P leftover from the Decimal PEP :) Otherwise, looks good.

Re: list addition methods compared.

2004-12-26 Thread Nick Coghlan
Steven Bethard wrote: (1) I didn't see the top of this thread, but I'm assuming that you've got a conditional or something in your real loop or you could just use lst.extend(items) without ever iterating over the items list. Your real code may actually require extend-style functionality, but as

Re: Windows XP - cron or scheduler for Python?

2004-12-26 Thread Esmail Bonakdarian
[EMAIL PROTECTED] wrote: Hi, I thought I'd throw in my 2 cents worth. I have written a freeware task scheduler that might be of interest to you. It's called Kirby Alarm And Task Scheduler. Over 16000 people around the world use it. Hi, Was this written in Python? If so 2 quick questions: 1. what di

Re: Python on Linux

2004-12-26 Thread Paul Rubin
"Austin" <[EMAIL PROTECTED]> writes: > On Red Hat 9, Python is installed by default and it's version is 2.2.2 > If I want to upgrade Python to 2.3.4(newer version), how could I do? > If I compile source code of Python, how do I uninstall the old version? > I tried rpm packages but failed with depen

Python on Linux

2004-12-26 Thread Austin
On Red Hat 9, Python is installed by default and it's version is 2.2.2 If I want to upgrade Python to 2.3.4(newer version), how could I do? If I compile source code of Python, how do I uninstall the old version? I tried rpm packages but failed with dependence. Could everyone give me a advise? --

Re: WxButton

2004-12-26 Thread LutherRevisited
That's kindof where I want to go, how can I detect whether or not my button has focus. Basically I only want to press it with enter if it has focus. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3000, zip, *args and iterators

2004-12-26 Thread Steven Bethard
Terry Reedy wrote: "Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] So, as I understand it, in Python 3000, zip will basically be replaced with izip, meaning that instead of returning a list, it will return an iterator. I think it worth repeating that Python 3 is at

Re: list addition methods compared.

2004-12-26 Thread Steven Bethard
Ishwor wrote: Could u run the code in your machine and perhaps and let me know what the average speed is?? The code is - [snip code not using timeit] Are you aware of the timeit module? It can do most of these timings for you. Here's the code I used: -- extend.py ---

Re: Unicode entries on sys.path

2004-12-26 Thread "Martin v. Löwis"
Just wrote: The real question here is: why does Python not support arbitrary Unicode strings on sys.path? It could, in principle, atleast on Windows NT+ (and also on OSX). Patches are welcome. Works for me on OSX 10.3.6, as it should: prior to using the sys.path entry, a unicode string is encoded

Re: Python 3000, zip, *args and iterators

2004-12-26 Thread Terry Reedy
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > So, as I understand it, in Python 3000, zip will basically be replaced > with izip, meaning that instead of returning a list, it will return an > iterator. I think it worth repeating that Python 3 is at yet somethin

Re: Tricks to install/run Python on Windows ?

2004-12-26 Thread Daniel Bickett
While I don't have any solutions for your problems outlined above, you certainly don't need to limit yourself to the "tools" you've been exposed to (nor should you make a generalization based on them). If PythonWin is giving you that much trouble, you could optionally use a different editor. I use

Re: Tricks to install/run Python on Windows ?

2004-12-26 Thread Ishwor
On Sun, 26 Dec 2004 19:43:24 +0100, StepH <[EMAIL PROTECTED]> wrote: > Hi, > > I'm new to Python. I'm working under XP, and I've alot of prob. (not > with the langage itself, but with the tools): > > I've install Pyhton 2.4 in C:\Python24, using the .msi windows installer. > Then, I've install "

Re: need some help with threading module...

2004-12-26 Thread Daniel Bickett
I found your object-oriented approach, while admirable, a little muddled. So rather than modify your code, I simply took the paragraph you wrote describing the scenario and wrote my own.[1] Instead of having the Controller query the Subject (not exactly plausible), I had it wait for a signal (thre

Re: list addition methods compared.

2004-12-26 Thread Ishwor
On Sun, 26 Dec 2004 18:37:35 -0500, Terry Reedy <[EMAIL PROTECTED]> wrote: > > "Ishwor" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > On Sun, 26 Dec 2004 04:57:17 -0500, Terry Reedy <[EMAIL PROTECTED]> wrote: > >> > >> "Ishwor" <[EMAIL PROTECTED]> wrote in message > >> news:[E

Re: list addition methods compared.

2004-12-26 Thread Terry Reedy
"Ishwor" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sun, 26 Dec 2004 04:57:17 -0500, Terry Reedy <[EMAIL PROTECTED]> wrote: >> >> "Ishwor" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> > Hi all >> > I have just wrote a small script to compare the speed of

Re: IDLE question

2004-12-26 Thread Ishwor
On Sun, 26 Dec 2004 13:02:01 +0100, Rolf Wester <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to use IDLE as interactively as I can with Emacs. In Emacs > I can send a marked region to the Python interpreter. Is there any way > to do the same thing with IDLE? Although i don't use anything much

Re: list addition methods compared.

2004-12-26 Thread Ishwor
On Sun, 26 Dec 2004 04:57:17 -0500, Terry Reedy <[EMAIL PROTECTED]> wrote: > > "Ishwor" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi all > > I have just wrote a small script to compare the speed of list addition > > methods. > > There are two meanings of 'list addition': >

Re: need some help with threading module...

2004-12-26 Thread M.E.Farmer
Just a warning! Threads and newbies don't mix well, many pitfalls and hard to find bugs await you. I would avoid using threads if at all possible. Now we have all that over lets see some code. py> import threading py> class Test(threading.Thread): ...def run(self): ... x = 0

Re: Tricks to install/run Python on Windows ?

2004-12-26 Thread Luke Skywalker
On Sun, 26 Dec 2004 19:43:24 +0100, StepH <[EMAIL PROTECTED]> wrote: >What's wrong ? Python seems terific, but the tools... You could uninstall both Python and PyWin32 a.k.a. PythonWin, and install ActiveState Python which includes both in one tool. Then, check if the PythonWin IDE works fine. L

Re: Complementary language?

2004-12-26 Thread gabriele renzi
Alex Martelli ha scritto: Nolo contendere (not having looked much into Alice yet), but are there stand-alone didactical materials for Alice as there are for Oz? > It > seemed to me that the available materials for Alice basically take SML > somewhat for granted, while Oz does come with tutorials

anit alias and vpython

2004-12-26 Thread FLChamp
I have created a simulation of the solar system which is graphically represented using vpython. I was wondering in there is some way to make the orbit paths look better (I was thinking of anti aliasing the lines). I havent been able to find any information on this so I assume its not supported but

Re: Optional Static Typing

2004-12-26 Thread Luis M. Gonzalez
Robert Kern wrote: > Automatic type inferencing is great, but sometimes the inference is > "object". Being able to supply more information about types helps > Starkiller keep the inferences tight and specific. Hmm... I'm not an expert in this subject at all, but I think that when the inference is

Re: need some help with threading module...

2004-12-26 Thread chahnaz.ourzikene
I think it is more suitable in this form... from threading import * class Subject(object): def __init__(self) : self.counter = 0 t = Timer(0.1,self.doIteratingStuff) t.start() def incrementCounter(self,n=1) :

Python 3000, zip, *args and iterators

2004-12-26 Thread Steven Bethard
So, as I understand it, in Python 3000, zip will basically be replaced with izip, meaning that instead of returning a list, it will return an iterator. This is great for situations like: zip(*[iter1, iter2, iter3]) where I want to receive tuples of (item1, item2, item3) from the iterables.

Re: need some help with threading module...

2004-12-26 Thread M.E.Farmer
> Thanks for all and merry x-mas and blablablah There is no X in Christmas, and blablablah should read Happy New Year! >Of course, the indentations are lost since i copied this code from my emacs >on linux, and then paste it on my outlook express (i don't have the net on >linux :(...). I have had

Re: list IndexError

2004-12-26 Thread Scott David Daniels
Ishwor wrote: On Thu, 23 Dec 2004 13:57:55 -0300, Batista, Facundo <[EMAIL PROTECTED]> wrote: #- True, true. Maybe you could lobby for copy as a builtin in #- Python 3000? That's a good idea to me. But copy() as a builtin is not clear if it's shallow or deep. IMHO its preferable to use shallow

Re: program in interactive mode

2004-12-26 Thread Scott David Daniels
B.G.R. wrote: numline=0 for line in sys.stdin: numline+=1 workwithline(line) I'd use: for numline, line in enumerate(sys.stdin): workwithline(line) Note: The line numbers start at 0, but that is often acceptable. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/

Re: Jython & IronPython Under Active Development?

2004-12-26 Thread HackingYodel
Cameron Laird wrote: In article <[EMAIL PROTECTED]>, Robert Kern <[EMAIL PROTECTED]> wrote: . . . It should be noted that Jim Hugunin no longer works on Jython although he did start the project (possibly with others, I'm not

need some help with threading module...

2004-12-26 Thread chahnaz.ourzikene
Hi all, This is the first i post in this newsgroup, i hope my english is not too bad... Let's get straight to the point ! I have a little probleme using threads in my little training example : I wish to create two threads in my application, one thread (the subject) will increment a variable, and a

Re: sql server support from linux

2004-12-26 Thread Scott David Daniels
Simon Wittber wrote: I considered doing exactly the same thing a while ago, but was worried about running into an annoyance like that. FWIW, The synchronous Pyro server performed much faster than the multithreaded version, even under heavy use from 3 machines. It appeared that while the database

Re: program in interactive mode

2004-12-26 Thread B.G.R.
"Alex Martelli" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > B.G.R. <[EMAIL PROTECTED]> wrote: >... > > numline=0 > > for line in sys.stdin: > > numline+=1 > > workwithline(line) > > Consider the alternative: > for numline, line in enumerate(sys.stdin): > > N

Re: Complementary language?

2004-12-26 Thread HackingYodel
Thanks for all the suggestions! I'm going to investigate all of them as time allows. I must say that Eiffel would most certainly expand my mind. My initial reaction, when looking at a "Hello World!" program, was "No way!". I had just read some of SICP and "Pascal is for building pyramids ­ impos

Re: program in interactive mode

2004-12-26 Thread Alex Martelli
B.G.R. <[EMAIL PROTECTED]> wrote: ... > numline=0 > for line in sys.stdin: > numline+=1 > workwithline(line) Consider the alternative: for numline, line in enumerate(sys.stdin): Nothing to do with your main program, but still neater... > that's ok, but if the user only does "./myp

Re: IDLE question

2004-12-26 Thread Kartic
Rolf, IDLE presents you with an interactive python prompt where you can enter your code : single statments, class definitions, functions and it will execute interactively. >From the IDLE editor, I doubt if you can do what you want. In fact IDLE will force you to save your code in a file before yo

Re: Configuration Files

2004-12-26 Thread M.E.Farmer
>thanks for the replies, guys! Your welcome, glad I could help. >(Spending time on these newsgroups is giving me more questions that >answers heh ) Thats good as long as it motivates you to learn ;) M.E.Farmer -- http://mail.python.org/mailman/listinfo/python-list

Re: A Revised Rational Proposal

2004-12-26 Thread Dan Bishop
Steven Bethard wrote: > Dan Bishop wrote: > > Mike Meyer wrote: > >> > >>PEP: XXX > > > > I'll be the first to volunteer an implementation. > > Very cool. Thanks for the quick work! > > For stdlib acceptance, I'd suggest a few cosmetic changes: No problem. """Implementation of rational arithmet

Re: program in interactive mode

2004-12-26 Thread M.E.Farmer
B.G.R. wrote: > Hi all, [snip] > A little bit more complex, but that's the idea. That will work if the user > does something like "./myprog.py < code" or "cat code | ./myprog.py", and > that's ok, but if the user only does "./myprog.py" then I got to get into > interactive mode and show a prompt in

program in interactive mode

2004-12-26 Thread B.G.R.
Hi all, I'm working on an interpreter for a university subject, which is programmed in python under linux. I got most of the work done and I'm just trying to settle some problems I've found on my way. Right now, the most important is reading the user input. Everything goes through the standard inp

Re: [Parsing] How do I process loops with PLY?

2004-12-26 Thread Edwin Young
"F. GEIGER" <[EMAIL PROTECTED]> writes: > But when loops enter the game, things seem to become more difficult: > > A=12 > B=23 > C=45 > D=56 > DX=0 > > FOR C # Exec the following lines C times >G X=A+DX Y=B Z=34 # Move to X, Y, Z > ># more statements... > >DX=DX+67 > NEXT > > How

Tricks to install/run Python on Windows ?

2004-12-26 Thread StepH
Hi, I'm new to Python. I'm working under XP, and I've alot of prob. (not with the langage itself, but with the tools): I've install Pyhton 2.4 in C:\Python24, using the .msi windows installer. Then, I've install "PythonWin" (the last build-203). I'll try to summerize my prob.: 1./ The PythonWin

Re: Configuration Files

2004-12-26 Thread flamesrock
thanks for the replies, guys! MEFarmer, that example helps remove a lot of the confusion, thanks! I've looked through the SDL but there are so many different ways to do it, I wasn't which one was hands down best And Mike, I wish they would stick explanations like that in the SDL! Would help make

Re: A Revised Rational Proposal

2004-12-26 Thread John Roth
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Dan Bishop wrote: Mike Meyer wrote: PEP: XXX I'll be the first to volunteer an implementation. Very cool. Thanks for the quick work! For stdlib acceptance, I'd suggest a few cosmetic changes: Use PEP 257[1] docstring con

Re: A Revised Rational Proposal

2004-12-26 Thread Steven Bethard
Dan Bishop wrote: Mike Meyer wrote: PEP: XXX I'll be the first to volunteer an implementation. Very cool. Thanks for the quick work! For stdlib acceptance, I'd suggest a few cosmetic changes: Use PEP 257[1] docstring conventions, e.g. triple-quoted strings. Use PEP 8[2] naming conventions, e.g. na

AttributeError of a module instance

2004-12-26 Thread Paolino
I'd like to catch AttributeError on the module level,so that I can declare default bindings for useds defore definition.How is this to be done?Thanks for help. Paolino -- http://mail.python.org/mailman/listinfo/python-list

Re: cosmetic Tkinter question

2004-12-26 Thread Michael Fuhr
[EMAIL PROTECTED] (Sean McIlroy) writes: > I've got a bunch of Frames, all packed into the root window with > side=TOP, and in each Frame I've got a Checkbutton packed with > side=LEFT. I expected the Checkbuttons to be flush with the left edge > of the window, but they're not, and it looks a litt

Re: Improving Python (was: Lambda going out of fashion)

2004-12-26 Thread Aahz
In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > >func(*arg) instead of apply() is a step back -- it hides the fact >that functions are objects, and it confuses the heck out of both >C/C++ programmers and Python programmers that understand the "def >func(*arg)" form, becau

Re: Jython & IronPython Under Active Development?

2004-12-26 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Robert Kern <[EMAIL PROTECTED]> wrote: . . . >It should be noted that Jim Hugunin no longer works on Jython although >he did start the project (possibly with others, I'm not sure).

SimpleHTTPServer, queries unhandled?

2004-12-26 Thread Bryan Rasmussen
Hey just doing some preliminary testing with SimpleHTTPServer, and i noticed that when i request a resource with a query string parameters that this was not handled. is this correct, or is there a method to set query string handling? -- Bryan Rasmussen -- http://mail.python.org/mailman/lis

cosmetic Tkinter question

2004-12-26 Thread Sean McIlroy
I've got a bunch of Frames, all packed into the root window with side=TOP, and in each Frame I've got a Checkbutton packed with side=LEFT. I expected the Checkbuttons to be flush with the left edge of the window, but they're not, and it looks a little gross. How do I get them to align? -- http://m

Re: Improving Python (was: Lambda going out of fashion)

2004-12-26 Thread Just
In article <[EMAIL PROTECTED]>, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > func(*arg) instead of apply() is a step back Strongly disagree. I find func(*args) much more readable than apply(func, args). > -- it hides the fact that functions are objects, What does this have to do with anything

Re: Complementary language?

2004-12-26 Thread Robin Becker
Alex Martelli wrote: Robin Becker <[EMAIL PROTECTED]> wrote: . Well your utility function seems to be related to "learn more approaches to programming". Which part of "if" do you find hard to parse? no part I suspect there may be some programming language measure which would push really hig

Re: Complementary language?

2004-12-26 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Robin Becker <[EMAIL PROTECTED]> wrote: . . . >interesting, but not unique features. From the outside it seems >difficult to say whether say "distributed programming" is uniquely >easily imple

[Parsing] How do I process loops with PLY?

2004-12-26 Thread F. GEIGER
I'm rather new to high level parsing with lex/yacc (and realy impressed so far). I'd like to parse *and execute* files like this: A=12 B=23 G X=A Y=B Z=34 # Move to X, Y, Z G Z=0 etc. No problems so far. But when loops enter the game, things seem to become more difficult: A=12 B=23 C=45 D=56

Re: A Revised Rational Proposal

2004-12-26 Thread Dan Bishop
Dan Bishop wrote: > Mike Meyer wrote: > > This version includes the input from various and sundry people. > Thanks > > to everyone who contributed. > > > > > > > PEP: XXX > > Title: A rational number module for Python > ... > > Implementation > > == > > > > There is currently a rati

Re: A Revised Rational Proposal

2004-12-26 Thread Dan Bishop
Mike Meyer wrote: > This version includes the input from various and sundry people. Thanks > to everyone who contributed. > > > PEP: XXX > Title: A rational number module for Python ... > Implementation > == > > There is currently a rational module distributed with Python, and a >

Re: Improving Python (was: Lambda going out of fashion)

2004-12-26 Thread Fredrik Lundh
Aahz wrote: >>(I've said it before, and I'll say it again: native unicode and >>generators are the only essential additions I've seen since 1.5.2, with >>properties and sub-classable C types sharing a distant third place. >>the rest of the stuff has had zero impact on my ability to write solid >>c

Re: Complementary language?

2004-12-26 Thread Alex Martelli
gabriele renzi <[EMAIL PROTECTED]> wrote: > The mozart/Oz platform have a stronger point on stuff like > constraint/logic/declarative concurren/etc programming, more than most > of the CL frameworks (not that this is hard in CL, it's just not as > central as in Oz). Btw, I think AliceML (which

Re: Complementary language?

2004-12-26 Thread Alex Martelli
Robin Becker <[EMAIL PROTECTED]> wrote: ... > >>>If you're looking for SERIOUS multiparadigmaticity, I think Oz may be ... > > Hmmm, I'm not sure how to parse this question. Robert Kern claimed: > > "You could very easily learn more approaches to programming through > > Common Lisp than thre

Re: WxListCtrl

2004-12-26 Thread Kartic
You might want to try using the SetColumnWidth method and give the column width in pixels. The user (or you) can the read the entire contents by dragging the column marker to the right (or you can give a tooltip that displays the entire list control item when the moused over) self.lc.SetColumnWidt

Re: Twisted Non-Admin Installation

2004-12-26 Thread Rob Williscroft
Kartic wrote in news:[EMAIL PROTECTED] in comp.lang.python: > Hello, > > I downloaded the Win32 installer for Twisted 1.3.0, Python 2.3. > > The installer, when executed under my login, fails as it requires > administrator rights to install (why they have it as a requirement, I > don't understa

Re: Twisted Non-Admin Installation

2004-12-26 Thread Kartic
Mike - I took the lazy route out. Since the Twisted installer complained about not finding python for admin, I exported the registry keys that Python installed my userid and imported those registry entries back under the admin login. This made it appear that there was indeed a Python install under

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

2004-12-26 Thread Fredrik Lundh
> QOTW: "Python, the language that wraps tightly around a problem and > swallows it whole." -- Raymond Hettinger that's taken from an old UnixWorld article by Aaron Watters, from 1995: http://www.networkcomputing.com/unixworld/tutorial/005/005.html -- http://mail.python.org/mailman/lis

Re: A Revised Rational Proposal

2004-12-26 Thread John Roth
"Dan Bishop" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Mike Meyer wrote: This version includes the input from various and sundry people. Thanks to everyone who contributed. PEP: XXX Title: A rational number module for Python ... Implicit Construction - Whe

Re: Complementary language?

2004-12-26 Thread beliavsky
Robert Kern wrote: >If you do numeric calculations, learning just enough FORTRAN to do loops >and math can be quite useful. I find that F2PY makes writing FORTRAN >subroutines for numerical calculations over Numeric arrays much easier >than C. I agree with this and would add that Fortran, from th

Re: Complementary language?

2004-12-26 Thread Robin Becker
Alex Martelli wrote: Robin Becker <[EMAIL PROTECTED]> wrote: Alex Martelli wrote: . If you're looking for SERIOUS multiparadigmaticity, I think Oz may be best -- (the book's authors critique the vagueness of the "paradigm" concept, and prefer "m

Re: where is ctypes.py?

2004-12-26 Thread Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle.
Hi ! See : http://starship.python.net/crew/theller/ctypes/ -- http://mail.python.org/mailman/listinfo/python-list

IDLE question

2004-12-26 Thread Rolf Wester
Hi, I would like to use IDLE as interactively as I can with Emacs. In Emacs I can send a marked region to the Python interpreter. Is there any way to do the same thing with IDLE? Thank you in advance Regards Rolf Wester -- http://mail.python.org/mailman/listinfo/python-list

Re: A Revised Rational Proposal

2004-12-26 Thread Dan Bishop
Mike Meyer wrote: > This version includes the input from various and sundry people. Thanks > to everyone who contributed. > > > PEP: XXX > Title: A rational number module for Python ... > Implicit Construction > - > > When combined with a floating type - either complex or fl

Re: Complementary language?

2004-12-26 Thread gabriele renzi
Robin Becker ha scritto: Alex Martelli wrote: . If you're looking for SERIOUS multiparadigmaticity, I think Oz may be best -- (the book's authors critique the vagueness of the "paradigm" concept, and prefer "model", but that's much the same thing

Re: Complementary language?

2004-12-26 Thread Alex Martelli
Robin Becker <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > . > > > > If you're looking for SERIOUS multiparadigmaticity, I think Oz may be > > best -- (the book's > > authors critique the vagueness of the "paradigm" concept, and prefer >

  1   2   >