"Re: Probleme mit der Installation der openSource Bittorrent.... python vs JAVA"

2005-01-07 Thread xunling
OK, no win english ;D I want to build my own bittorrent client to add some usefull features as "special download directory" and "save as rar-file passwordprotected" Does anyone know if the azureus project has an opensource version? I want to write it in JAVA because java is what i

Re: python3: 'where' keyword

2005-01-07 Thread Steven Bethard
Steven Bethard wrote: How often is this really necessary? Could you describe some benefits of this? I think the only time I've ever run into scoping problems is with lambda, e.g. [lambda x: f(x) for x, f in lst] instead of [lambda x, f=f: for x, f in lst] Sorry, bad example, this shoul

Re: Developing Commercial Applications in Python

2005-01-07 Thread Philippe C. Martin
> >> Can somebody there to point me any good commercial applications >> developed using python ? > Only time will tell if SCF is a _good_ commercial application, but it will be released on my site as soon as I get my export license from the BIS. _and_ I will certainly announce it on this list

Re: Working with recordsets

2005-01-07 Thread AdSR
[EMAIL PROTECTED] wrote: Hi. I have one recorset that I would like to pass to 2 functions, one is for create an CSV file and the other one is to create a HTML file. The problem is that the recordset is totally read in the first function, and then when I pass it to the second funtion the recordset i

Tkinter: passing parameters to menu commands

2005-01-07 Thread Philippe C. Martin
Hi, I have he following need and do not find an easy way out: I have many menu items and would like them all to call the same method -However, I need the method called to react differently depending on the menu item selected. Since the menu command functions do not seem to receive any type of eve

Re: The Industry choice

2005-01-07 Thread Jeff Shannon
Paul Rubin wrote: Jeff Shannon <[EMAIL PROTECTED]> writes: Note that the so-called 'viral' nature of GPL code only applies to *modifications you make* to the GPL software. Well, only under an unusually broad notion of "modification". True enough. It can be difficult, in software development,

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Jeff Shannon <[EMAIL PROTECTED]> wrote: ... > Hm, I should have been more clear that I'm inferring this from things > that others have said about lambdas in other languages; I'm sadly > rather language-deficient (especially as regards *worthwhile* > languages) m

escape string for command line

2005-01-07 Thread Ksenia Marasanova
Hi, I have a simple ecard creation script on a website, where user can add text to a graphic. I use ImageMagick for it: # template_file => path to image template file # new_file => path to generated file # text => user input command = '''convert %s -font OfficinaSanITC-BookOS -pointsize 12 -fill

Re: python3: 'where' keyword

2005-01-07 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Steven Bethard <[EMAIL PROTECTED]> wrote: > Andrey Tatarinov wrote: > > It would be great to be able to reverse usage/definition parts in > > haskell-way with "where" keyword. Since Python 3 would miss lambda, that > > would be extremly useful for creating readab

OT: google groups bug, or worse?

2005-01-07 Thread aaronwmail-usenet
I'm concerned that google groups is not correctly reflecting the python lists. A month ago I announced the xsdbXML framework to the python list and the python-announce list. As you can see from the links below the python announce submission was approved by the moderators (thanks!) and the python

Re: The Industry choice

2005-01-07 Thread Jeff Shannon
Bulba! wrote: On 6 Jan 2005 19:01:46 -0500, [EMAIL PROTECTED] (Aahz) wrote: Note that the so-called 'viral' nature of GPL code only applies to *modifications you make* to the GPL software. The *only* way in which your code can be 'infected' by the GPL is if you copy GPL source. That's not true

Re: python3: 'where' keyword

2005-01-07 Thread AdSR
Andrey Tatarinov wrote: Hi. It would be great to be able to reverse usage/definition parts in haskell-way with "where" keyword. Since Python 3 would miss lambda, that would be extremly useful for creating readable sources. Usage could be something like: >>> res = [ f(i) for i in objects ] where

switching an instance variable between a property and a normal value

2005-01-07 Thread Steven Bethard
I'd like to be able to have an instance variable that can sometimes be accessed as a property, and sometimes as a regular value, e.g. something like: py> class C(object): ... def usevalue(self, x): ... self.x = x ... def usefunc(self, func, *args, **kwds): ... self._func,

Recent infoworld column

2005-01-07 Thread Dwarf Electrician
from a long time listener... http://www.infoworld.com/article/04/12/30/01OPstrategic_1.html -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-07 Thread Jeff Shannon
Alex Martelli wrote: Jeff Shannon <[EMAIL PROTECTED]> wrote: Note that the so-called 'viral' nature of GPL code only applies to *modifications you make* to the GPL software. The *only* way in which your code can be 'infected' by the GPL is if you copy GPL source. ... (Problems may come if some

Exception report library

2005-01-07 Thread Ian Bicking
I've been using one of several systems to catch unexpected exceptions and log them (e.g., write to a file, display on web page, email me, etc). But many are built into a particular system, or have an interesting but incomplete set of features. E.g., many web frameworks have exception reporter

Display Function Code Body?

2005-01-07 Thread Haibao Tang
Hail Python pals! I played with the R (http://r-project.cran.org) last night to do some statistics and it has an interactive session too, and I found a feature that is quite useful. I found by actually typing a function name, the R gives you a code body output. > f1 = function(x){x*x} > f1 funct

DOS problem (simple fix??)

2005-01-07 Thread Gavin Bauer
My DOS window (running in windows ME) closes the second it finishes running my programs. As you can imagine, this makes it hard to see the results. I've gotten in the habit of putting raw_input("Press enter to exit") at the end of every program, and in addition to being pain in the butt, it often f

Re: Calling Function Without Parentheses!

2005-01-07 Thread Jeff Shannon
Kamilche wrote: Yeah, but still. If they even had the most basic check, like 'an object is being referred to on this line, but you're not doing anything with it' would be handy in catching that. When you use an object like that, usually you're doing something with it, like assigning it to a variabl

Re: Display Function Code Body?

2005-01-07 Thread Steven Bethard
Haibao Tang wrote: What I would like to do is to write a function like disp(), when typed, it can give you the code infomation. Check the docs entitled "Retrieving source code": http://docs.python.org/lib/inspect-source.html Depending on what you want, you may be able to use inspect.getsource: py>

Re: Tkinter: passing parameters to menu commands

2005-01-07 Thread Kent Johnson
Philippe C. Martin wrote: I have many menu items and would like them all to call the same method -However, I need the method called to react differently depending on the menu item selected. Since the menu command functions do not seem to receive any type of event style object, is there some type of

Re: Calling Function Without Parentheses!

2005-01-07 Thread Kamilche
Uh, you're right! I wouldn't want to bog Python down with even more checking at run time. I guess I'm asking for syntax checks that are typically done only with compiled languages. It doesn't stop me from using Python, though! Since I don't have syntax checking, I find I have to test supporting r

Tkinter: using a Listbox

2005-01-07 Thread Ebba Cecilia Ovesdotter Alm
Hello, I'm learning how to use the Tkinter module. I would like to use an element similar to a drop-down form, where the user can select one option out of many. I thought that a Listbox item could do just this. The following extract from my code (with the listbox part basically mirroring http://ef

Software archeology (was Re: Developing Commercial Applications in Python)

2005-01-07 Thread Aahz
In article <[EMAIL PROTECTED]>, Stephen Waterbury <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] writes: >>> >>>Can somebody there to point me any good commercial applications >>>developed using python ? > >Also see Python Success Stories: http://pythonology.org/success > >A notable example is

Re: The Industry choice

2005-01-07 Thread Scott Robinson
On Fri, 07 Jan 2005 12:06:42 -0800, Jeff Shannon <[EMAIL PROTECTED]> wrote: >Bulba! wrote: > >> On 6 Jan 2005 19:01:46 -0500, [EMAIL PROTECTED] (Aahz) wrote: >> >> Note that the so-called 'viral' nature of GPL code only applies to *modifications you make* to the GPL software. The *only

Re: sorting on keys in a list of dicts

2005-01-07 Thread Jeff Shannon
Nick Coghlan wrote: Jeff Shannon wrote: I suppose that your version has the virtue that, if the sortkey value is equal, items retain the order that they were in the original list, whereas my version will sort them into an essentially arbitrary order. Is there anything else that I'm missing here

RE: DOS problem (simple fix??)

2005-01-07 Thread Robert Brewer
Gavin Bauer wrote: > My DOS window (running in windows ME) closes the second it finishes > running my programs. As you can imagine, this makes it hard to see the > results. I've gotten in the habit of putting raw_input("Press enter to > exit") at the end of every program, and in addition to being p

RE: Display Function Code Body?

2005-01-07 Thread Robert Brewer
Haibao Tang wrote: > Hail Python pals! I played with the R (http://r-project.cran.org) last > night to do some statistics and it has an interactive session too, and > I found a feature that is quite useful. > > I found by actually typing a function name, the R gives you a > code body output. > >

Re: Tkinter: passing parameters to menu commands

2005-01-07 Thread Philippe C. Martin
>>menu.add_cascade(label="File", menu=filemenu) >>filemenu.add_command(label="New", command=lambda: callback('New')) >>filemenu.add_command(label="Open...", command=lambda: callback('Open')) >>filemenu.add_separator() >>filemenu.add_command(label="Exit", command=lambda: callback('Exit')) mainloop()

Re: Tkinter: using a Listbox

2005-01-07 Thread Steve
> #Listbox > self.listbox = Listbox(self.selectFrame) > self.listbox.insert(END, "a list entry") > for item in ["A","B","C"]: > self.listbox.insert(END, item) Don't forget to pack the listbox. You may find this useful... http://www.ferg.org/thinking_in_tkinter/index.html -- http://mail.py

Re: DOS problem (simple fix??)

2005-01-07 Thread beliavsky
When I have a Python script generating a lot of output, I either open an output file and then print to it with fp = open("results.txt","w") print>>fp,"stuff" or I redirect output to a file from the command line using ">" (also works on Unix), for example python foo.py > results.txt An alternati

Re: DOS problem (simple fix??)

2005-01-07 Thread Daniel Bickett
I tend to run "cmd" and "cd" to the directory of the script, then run it. This way, the window doesn't close, and I can read any errors that occur without interruption. Optionally, you can run "cmd" and simply drag the script you want to run into the window. That pastes its path (in quotes) into th

Re: What could 'f(this:that=other):' mean?

2005-01-07 Thread Jonathan Fine
Jonathan Fine wrote: I'll post some usage examples later today, I hope. Well, here are some examples. A day later, I'm afraid. ** Pipelines and other composites This is arising for me at work. I produce Postscript by running TeX on a document. And then running dvips on the output of TeX. TeX as

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Paul Rubin
Nick Coghlan <[EMAIL PROTECTED]> writes: > Add in the fact that there are many, many Python programmers with > non-CS backgrounds, and the term 'lambda' sticks out like a sore thumb > from amongst Python's other English-based keywords. 'def' is probably > the second-most cryptic when you first enco

RE: switching an instance variable between a property and a normal value

2005-01-07 Thread Robert Brewer
Steven Bethard wrote: > I'd like to be able to have an instance variable that can > sometimes be > accessed as a property, and sometimes as a regular value, > e.g. something > like: ... > py> c.x is c.x # I'd like this to be False You'd like 'c.x is c.x' to be FALSE? You can't be serious. Must

Re: Python Operating System???

2005-01-07 Thread Paul Rubin
[EMAIL PROTECTED] (Michael Hobbs) writes: > The problem when using Python instead of C for OS development is that > C was *specifically designed* to create an OS, while Python was designed > for completely different purposes. If you want to write an OS, it would > be wise to use a language that is

Re: Other notes

2005-01-07 Thread Bengt Richter
On Fri, 07 Jan 2005 06:04:01 GMT, Andrew Dalke <[EMAIL PROTECTED]> wrote: >Bengt Richter: >> But it does look ahead to recognize += (i.e., it doesn't generate two >> successive also-legal tokens of '+' and '=') >> so it seems it should be a simple fix. > >But that works precisely because of the gr

Re: python3: 'where' keyword

2005-01-07 Thread Paul Rubin
Donn Cave <[EMAIL PROTECTED]> writes: > I don't by any means agree that this notation is worth adopting, and > in general I think this kind of readability issue is more or less a lost > cause for a language with Python's scoping rules, but the motive makes > sense to me. But we're talking about

Re: DOS problem (simple fix??)

2005-01-07 Thread Paul Rubin
Gavin Bauer <[EMAIL PROTECTED]> writes: > Thank you, and please make all answers simple enough to be understood > by a highschool student and his father :) . You might like to try IDLE, which is included with Python. -- http://mail.python.org/mailman/listinfo/python-list

Re: args (was Re: Lambda as declarative idiom (was RE: what is lambda used for in real code?))

2005-01-07 Thread Bengt Richter
On Tue, 04 Jan 2005 14:11:51 -0800, Michael Spencer <[EMAIL PROTECTED]> wrote: [Hm, this didn't go out for some reason. I'll just send it now.] >Roman Suzi wrote: > >> Maybe this is too outlandish, but I see lambdas as a "quote" mechanism, >> which presents a possibility to postpone (precisely con

Re: Tkinter: passing parameters to menu commands (looping through a list)

2005-01-07 Thread Philippe C. Martin
I face a strange behavior when adding menu labels / command parameters from a list: *** This is the code that works but I wish to avoid - ATR and IN appear in the menu, and __Dec is called with ATR or IN depending on the choice *** l_dec.add_command(label = 'ATR', command= lambda: self.__Dec('ATR

RE: Exception report library

2005-01-07 Thread Robert Brewer
Ian Bicking wrote: > I've been using one of several systems to catch unexpected exceptions > and log them (e.g., write to a file, display on web page, email me, > etc). But many are built into a particular system, or have an > interesting but incomplete set of features. E.g., many web > frame

"A Fundamental Turn Toward Concurrency in Software"

2005-01-07 Thread aurora
Hello! Just gone though an article via Slashdot titled "The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software" [http://www.gotw.ca/publications/concurrency-ddj.htm]. It argues that the continous CPU performance gain we've seen is finally over. And that future gain would

Re: how to extract columns like awk $1 $5

2005-01-07 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Anand S Bisen <[EMAIL PROTECTED]> wrote: >Hi > >Is there a simple way to extract words speerated by a space in python >the way i do it in awk '{print $4 $5}' . I am sure there should be some >but i dont know it. Something along the lines of: words = input.split(

Re: Notification of PEP Updates

2005-01-07 Thread Erik Max Francis
Nick Coghlan wrote: I can't recall which thread this came up in, so I'm starting a new one. . . Barry Warsaw has kindly added a "peps" topic to the python-checkins mailing list. If you want to be notified only when PEP's get updated, then subscribe to python-checkins and edit your settings to sel

Re: Exception report library

2005-01-07 Thread Ian Bicking
Robert Brewer wrote: I've been using one of several systems to catch unexpected exceptions and log them (e.g., write to a file, display on web page, email me, etc). But many are built into a particular system, or have an interesting but incomplete set of features. E.g., many web frameworks ha

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-07 Thread Paul Rubin
aurora <[EMAIL PROTECTED]> writes: > Just gone though an article via Slashdot titled "The Free Lunch Is > Over: A Fundamental Turn Toward Concurrency in Software" > [http://www.gotw.ca/publications/concurrency-ddj.htm]. It argues that > the continous CPU performance gain we've seen is finally ove

Re: how to extract columns like awk $1 $5

2005-01-07 Thread Paul Rubin
[EMAIL PROTECTED] (Roy Smith) writes: > Something along the lines of: > > words = input.split() > print words[4], words[5] That throws an exception if there are fewer than 6 fields, which might or might not be what you want. -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter: passing parameters to menu commands (looping througha list)

2005-01-07 Thread Michael Fuhr
"Philippe C. Martin" <[EMAIL PROTECTED]> writes: > l_dec_list = ['ATR','IN'] > > for i in l_dec_list: > l_dec.add_command(label = i, command= lambda: self.__Dec(i)) Give the lambda an argument with a default: l_dec.add_command(label=i, command=lambda x=i: self.__Dec(x)) -- Michael Fuhr http:

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Bengt Richter
On 07 Jan 2005 14:38:01 +0100, Jacek Generowicz <[EMAIL PROTECTED]> wrote: [...] > >[*] Funnily enough, getting them to understand that "lambda x: fn(x)" >is just a very silly way of writing "fn", can be quite a struggle >at times ... but that's probably a consequence of the context in >

Re: What could 'f(this:that=other):' mean?

2005-01-07 Thread Jonathan Fine
Jeff Shannon wrote: Jonathan Fine wrote: The use of *args and **kwargs allows functions to take a variable number of arguments. The addition of ***nsargs does not add significantly. I've posted usage examples elsewhere in this thread. I think they show that ***nsargs do provide a benefit. At l

Re: Tkinter: passing parameters to menu commands (looping through a list)

2005-01-07 Thread Philippe C. Martin
>>l_dec.add_command(label=i, command=lambda x=i: self.__Dec(x)) Woof! I'd better do my homework on lambda ! Thanks, Philippe -- *** Philippe C. Martin SnakeCard LLC www.snakecard.com *** -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Operating System???

2005-01-07 Thread Bengt Richter
On Fri, 07 Jan 2005 16:34:48 -, [EMAIL PROTECTED] (Michael Hobbs) wrote: >David Brown <[EMAIL PROTECTED]> wrote: >> Hello. I recently came across a free operating system called Unununium (or >> something like that) and it was developed in Python and Assembly. >> >> Now, I have been looking fo

Returning same type as self for arithmetic in subclasses

2005-01-07 Thread Max M
# -*- coding: latin-1 -*- """ I subclass datetime and timedelta >>> dt = myDatetime(1970,1,1) >>> type(dt) >>> td = myTimedelta(hours=1) >>> type(td) But when I do arithmetic with these classes, they return datetime and timedelta, where I want them to return myDatetime and myTimedelta >>> new_t

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-07 Thread Jack Diederich
On Fri, Jan 07, 2005 at 01:35:46PM -0800, aurora wrote: > Hello! > > Just gone though an article via Slashdot titled "The Free Lunch Is Over: A > Fundamental Turn Toward Concurrency in Software" > [http://www.gotw.ca/publications/concurrency-ddj.htm]. It argues that the > continous CPU perfo

Re: switching an instance variable between a property and a normal value

2005-01-07 Thread Steven Bethard
Robert Brewer wrote: Steven Bethard wrote: I'd like to be able to have an instance variable that can sometimes be accessed as a property, and sometimes as a regular value, e.g. something like: ... py> c.x is c.x # I'd like this to be False You'd like 'c.x is c.x' to be FALSE? You can't be seri

Re: The Industry choice

2005-01-07 Thread Stefan Axelsson
Bulba! wrote: Oh, and by the way - since Python bytecode can be relatively easily decompiled to source, could it interpreted to "really" count as source code and not binary? What are the consequences of releasing code _written in Python_ as GPLed? Well, to your first question, in a word 'no', i

Tkinter, Alt, and Windows

2005-01-07 Thread Tim Daneliuk
Arggg. I have a program that runs comfortably across both Unix variants and Windows ... except I wish to bind an Alt-ButtonRelease-3 combination to popup a menu. This works flawlessly under Unix, but with windows, the menu appears briefly and then disappears. I'm guessing that Alt under

Re: Notification of PEP Updates

2005-01-07 Thread Bengt Richter
On Sat, 08 Jan 2005 03:28:34 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote: >I can't recall which thread this came up in, so I'm starting a new one. . . > >Barry Warsaw has kindly added a "peps" topic to the python-checkins mailing >list. If you want to be notified only when PEP's get updated, th

Re: OT: google groups bug, or worse?

2005-01-07 Thread Bengt Richter
On 7 Jan 2005 11:59:25 -0800, [EMAIL PROTECTED] wrote: >I'm concerned that google groups is not correctly reflecting the >python lists. A month ago I announced the xsdbXML framework to the >python list and the python-announce list. As you can see from the >links >below the python announce submis

RE: switching an instance variable between a property and a normal value

2005-01-07 Thread Robert Brewer
Steven Bethard wrote: > I'm playing around with a mapping type that uses setdefault > as suggested > in http://www.python.org/moin/Python3_2e0Suggestions. The > default value > for a missing key is either a simple value, or a value > generated from a > function. If it's generated from the f

Re: Tkinter, Alt, and Windows

2005-01-07 Thread Tim Daneliuk
Tim Daneliuk wrote: Arggg. I have a program that runs comfortably across both Unix variants and Windows ... except I wish to bind an Alt-ButtonRelease-3 combination to popup a menu. This works flawlessly under Unix, but with windows, the menu appears briefly and then disappears. I'm g

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-07 Thread Steve Horsley
Jack Diederich wrote: On Fri, Jan 07, 2005 at 01:35:46PM -0800, aurora wrote: Hello! Just gone though an article via Slashdot titled "The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software" [http://www.gotw.ca/publications/concurrency-ddj.htm]. It argues that the continous

Re: OT: google groups bug, or worse?

2005-01-07 Thread olsongt
[EMAIL PROTECTED] wrote: > I'm concerned that google groups is not correctly reflecting the > python lists. A month ago I announced the xsdbXML framework to the > python list and the python-announce list. As you can see from the > links > below the python announce submission was approved by the

RE: Exception report library

2005-01-07 Thread Robert Brewer
Ian Bicking wrote: > I've been using one of several systems to catch unexpected > exceptions and log them (e.g., write to a file, display on > web page, email me, etc). But many are built into a > particular system, or have an interesting but incomplete > set of features... > I feel like there mu

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Bengt Richter
On 07 Jan 2005 13:24:39 -0800, Paul Rubin wrote: >Nick Coghlan <[EMAIL PROTECTED]> writes: >> Add in the fact that there are many, many Python programmers with >> non-CS backgrounds, and the term 'lambda' sticks out like a sore thumb >> from amongst Python's other Englis

Re: Notification of PEP Updates

2005-01-07 Thread Steven Bethard
Bengt Richter wrote: On Sat, 08 Jan 2005 03:28:34 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote: I can't recall which thread this came up in, so I'm starting a new one. . . Barry Warsaw has kindly added a "peps" topic to the python-checkins mailing list. If you want to be notified only when PEP's

Re: Getting rid of "self."

2005-01-07 Thread Sean Ross
"BJörn Lindqvist" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Thank you for your replies. But they don't deal with my original question. :) I have read the thousands of posts all saying "self is good" and they are right. But this time I want to be different m-kay? I figure that ther

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-07 Thread John Roth
"aurora" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hello! Just gone though an article via Slashdot titled "The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software" [http://www.gotw.ca/publications/concurrency-ddj.htm]. It argues that the continous CPU perform

Re: switching an instance variable between a property and a normal value

2005-01-07 Thread Steven Bethard
Robert Brewer wrote: Steven Bethard wrote: I'm playing around with a mapping type that uses setdefault as suggested in http://www.python.org/moin/Python3_2e0Suggestions. The default value for a missing key is either a simple value, or a value generated from a function. If it's generated fro

Re: AttributeError of a module instance

2005-01-07 Thread holger krekel
On Mon, Dec 26, 2005 at 17:41 +, Paolino wrote: > 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. It cannot be done directly but with a small hack. This is the idea: impor

Help uninstalling/installing Python 2.4

2005-01-07 Thread Baggs
Guys/Gals I've messed up my Python 2.4 install. I'm really new to Python (and Linux for that matter) and really wanted to try Python out. I have mandrake 10.1. The first thing I did was uninstalled via rpm Python 2.3 and Tkinter 8.3 (I now realize that was a mistake, since I could have both v

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Jeff Shannon
Paul Rubin wrote: Richard Feynman told a story about being on a review committee for some grade-school science textbooks. One of these book said something about "counting numbers" and it took him a while to figure out that this was a new term for what he'd been used to calling "integers". With all

Re: OT: spacing of code in Google Groups

2005-01-07 Thread JanC
Peter Hansen schreef: > Steve Holden wrote: > >> Or even used cut(1) from the command line. > > Or myybe not :-) > > Microsoft Windows XP [Version 5.1.2600] > (C) Copyright 1985-2001 Microsoft Corp. > > c:\>cut > 'cut' is not recognized as an internal or external command, > operable program or

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Alan Gauld
On Fri, 07 Jan 2005 08:44:57 -0700, Steven Bethard <[EMAIL PROTECTED]> wrote: > > The unfamiliar argument doesn't work for me. After all most > > people are unfamiliar with complex numbers (or imaginary) numbers > > complex numbers. Lambdas, on the other hand, show up in all kinds of > code, and

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Terry Hancock
On Friday 07 January 2005 06:12 pm, Jeff Shannon wrote: > Paul Rubin wrote: > > > Richard Feynman told a story about being on a review committee for > > some grade-school science textbooks. One of these book said something > > about "counting numbers" and it took him a while to figure out that >

Re: why not datetime.strptime() ?

2005-01-07 Thread Skip Montanaro
josh> Shouldn't datetime have strptime? Sure, but it's not quite as trivial to implement as was strftime() support. While strftime() is a C library function and thus easily called from within the datetime C code, strptime() is implemented in Python as part of the time module for portability (

Re: Notification of PEP Updates

2005-01-07 Thread Skip Montanaro
Nick> Let us know if it does anything odd (e.g. sending updates about Nick> other checkins) Note that the lone criterion for inclusion is the word "PEP" in the subject or the first few lines of the message. You might thus see the occasional checkin message that mentions "PEP" but isn't d

Re: Returning same type as self for arithmetic in subclasses

2005-01-07 Thread Tim Peters
[Max M] > """ > I subclass datetime and timedelta > > >>> dt = myDatetime(1970,1,1) > >>> type(dt) > > > >>> td = myTimedelta(hours=1) > >>> type(td) > > > But when I do arithmetic with these classes, they return datetime and > timedelta, ... > >>> new_time = dt + td > >>> new_time > datetime.

EOF for binary?

2005-01-07 Thread flamesrock
Hi, So if I understand correctly, there are NO eof characters in any binary file. If so, is there an easier way to check for the end of the file than: os.path.getsize(infile) <= infile.tell() Because that returns the error: # File "/usr/lib/python2.3/posixpath.py", line 142, in getsize #ret

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Steven Bethard
Alan Gauld wrote: On Fri, 07 Jan 2005 08:44:57 -0700, Steven Bethard <[EMAIL PROTECTED]> wrote: The unfamiliar argument doesn't work for me. After all most people are unfamiliar with complex numbers (or imaginary) numbers complex numbers. Lambdas, on the other hand, show up in all kinds of code,

Publish your program for free and enjoy worry free earning. 100% !!!! FREE (AND WE MEAN IT - FREE)

2005-01-07 Thread DohnoSoft
Developers, please read this information. If you have some program or utility that you think may be interesting to somebody else, go ahead and submit it to www.dohnosoft.com This is 100% FREE!!! and DohnoSoft will take care of all issues related to sales, payments and customer support. You wil

Re: EOF for binary?

2005-01-07 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "flamesrock" <[EMAIL PROTECTED]> wrote: > Hi, > > So if I understand correctly, there are NO eof characters in any binary > file. If so, is there an easier way to check for the end of the file > than: > > os.path.getsize(infile) <= infile.tell() How you detect E

Re: Notification of PEP Updates

2005-01-07 Thread Bengt Richter
On Fri, 07 Jan 2005 16:05:31 -0700, Steven Bethard <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> On Sat, 08 Jan 2005 03:28:34 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote: >> >> >>>I can't recall which thread this came up in, so I'm starting a new one. . . >>> >>>Barry Warsaw has kindly a

Re: EOF for binary?

2005-01-07 Thread flamesrock
Thanks! I don't know why, but the most innefficient and unmaintanable means of doing something usually pops into my head before anything else. I solved this by going elif len(header) < 8: break -- http://mail.python.org/mailman/listinfo/python-list

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread BJörn Lindqvist
The more features a language has, the harder it becomes to learn. An example of that is C++ which has almost everything. Classes, structs, templates, strange keywords that noone uses like auto, inline const, passing by reference/value, enum, union, lots of macros, multiple inheritance, namespaces e

Re: Python Operating System???

2005-01-07 Thread Arich Chanachai
Paul Rubin wrote: [EMAIL PROTECTED] (Michael Hobbs) writes: The problem when using Python instead of C for OS development is that C was *specifically designed* to create an OS, while Python was designed for completely different purposes. If you want to write an OS, it would be wise to use a lang

Re: Python Operating System???

2005-01-07 Thread Paul Rubin
Arich Chanachai <[EMAIL PROTECTED]> writes: > >But I thought Python was an all-purpose language. After all, OS's > >have been written in Lisp before too. > > > Pure Lisp? Or a Lisp/C/Asm combo? Lisp has a compiled flavor by the way. Compiled flavor? Lisp has been compiled since the 1950's.

Re: Python Operating System???

2005-01-07 Thread Arich Chanachai
Paul Rubin wrote: Arich Chanachai <[EMAIL PROTECTED]> writes: But I thought Python was an all-purpose language. After all, OS's have been written in Lisp before too. Pure Lisp? Or a Lisp/C/Asm combo? Lisp has a compiled flavor by the way. Compi

Re: Python evolution: Unease

2005-01-07 Thread Robert Kern
Scott David Daniels wrote: If you can wait, the plan for MacEnthon (Python 2.4 on Mac) looks great: Actually, just packages for 2.3 (or 2.3.x for Tiger) as of right now. When someone else packages up 2.4 nicely, I'll start making packages for that, too. http://www.scipy.org/wikis/featurerequ

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread James Stroud
On Friday 07 January 2005 01:24 pm, Paul Rubin wrote: > Nick Coghlan <[EMAIL PROTECTED]> writes: > > Add in the fact that there are many, many Python programmers with > > non-CS backgrounds, and the term 'lambda' sticks out like a sore thumb > > from amongst Python's other English-based keywords. >

The limitation of the Photon Hypothesis

2005-01-07 Thread bill
Please reply to [EMAIL PROTECTED], thank you ! The limitation of the Photon Hypothesis According to the electromagnetic theory of light, its energy is related to the amplitude of the electric field of the electromagnetic wave, W=eE^2V(where E is the amplitude and V is the volume). It apparen

Re: DOS problem (simple fix??)

2005-01-07 Thread Brian van den Broek
Gavin Bauer said unto the world upon 2005-01-07 15:47: My DOS window (running in windows ME) closes the second it finishes running my programs. As you can imagine, this makes it hard to see the Thank you, and please make all answers simple enough to be understood by a highschool student and his fa

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Roy Smith
In article <[EMAIL PROTECTED]>, James Stroud <[EMAIL PROTECTED]> wrote: > On Friday 07 January 2005 01:24 pm, Paul Rubin wrote: > > Nick Coghlan <[EMAIL PROTECTED]> writes: > > > Add in the fact that there are many, many Python programmers with > > > non-CS backgrounds, and the term 'lambda' stic

Python/Qt Problem

2005-01-07 Thread Michael
Hi, I am experiencing something very weird with PyQt. I have created several windows based on QWidget using Designer. I can easily hide and show these with the hide and show methods. However I have just created a new window with Designer and the show method works in my main script but not insid

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-07 Thread Erik Max Francis
aurora wrote: Just gone though an article via Slashdot titled "The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software" [http://www.gotw.ca/publications/concurrency-ddj.htm]. It argues that the continous CPU performance gain we've seen is finally over. And that future gain

Re: Software archeology (was Re: Developing Commercial Applications in Python)

2005-01-07 Thread Stephen Waterbury
Aahz wrote: In article <[EMAIL PROTECTED]>, Stephen Waterbury <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] writes: Can somebody there to point me any good commercial applications developed using python ? Also see Python Success Stories: http://pythonology.org/success A notable example is Verity's

Re: Getting rid of "self."

2005-01-07 Thread Jeremy Bowers
On Fri, 07 Jan 2005 14:39:09 +0100, BJÃrn Lindqvist wrote: > It works! exec(magic()) does the needed hi = self.hi. No it doesn't. Try "hi = 'newValue'" and see what happens. So the next step is to write an "unmagic" function. So now how do you add instance variables? There is no way to avoid "se

Re: Calling Function Without Parentheses!

2005-01-07 Thread Nick Coghlan
Kamilche wrote: Uh, you're right! I wouldn't want to bog Python down with even more checking at run time. I guess I'm asking for syntax checks that are typically done only with compiled languages. In that case, I can suggest having a look at Pychecker, which performs static sanity checks on Pytho

Re: Getting rid of "self."

2005-01-07 Thread Roy Smith
Jeremy Bowers <[EMAIL PROTECTED]> wrote: > were I programming in C++ routinely now I'd prefix "this" and > dispense with that ugly "m_" garbage. (One of the things I ***hate*** > about C++ culture is its acceptance of hideously ugly variable names, > but now I'm two parentheticals deep so I prob

<    1   2   3   >