Re: initialization in argument definitions

2008-11-22 Thread Marc 'BlackJack' Rintsch
On Sun, 23 Nov 2008 13:13:11 +1300, greg wrote: > George Sakkis wrote: > >> Don't worry, it's not obvious to *anyone* new to Python (and many not- >> so-new for that matter). > > That's by no means certain, because we only hear from the people who > guessed the wrong way. We have no way of knowi

Re: build minimal python 2.6 on linux

2008-11-22 Thread Paul Rubin
r <[EMAIL PROTECTED]> writes: > The files weigh in at 51MB and some change. > Since transfer from USB on the laptop is painfully slow, and the cdrom > is toast, i need to slim down the 2.6 source as much as possible, so > it doesn't take 2 days to copy, Even with USB 1.0, 51 mb should only take a

Re: Feedback

2008-11-22 Thread Banibrata Dutta
2008/11/21 Ali art <[EMAIL PROTECTED]> > I am using Windows XP professional version 2002 Service pack 3. AMD > Athlon(TM)XP 2400+ 2.00GHz 992MB RAM. > I have download Windows x86 MSI Instaler (3.0rc2) Python 3.0rc2 Release: > 06-Nov-2008. > > I want to use source code file from Python Command lin

build minimal python 2.6 on linux

2008-11-22 Thread r
I would like to install minimal version if python 2.6 on a linux laptop (and no there is not one already installed...i checked) i have no way to access the net with the laptop. So basicly i down loaded the 2.6 source and unpacked it on my other PC. The files weigh in at 51MB and some change. Since

Re: initialization in argument definitions

2008-11-22 Thread Aaron Brady
On Nov 21, 3:25 pm, Brentt <[EMAIL PROTECTED]> wrote: > Hi, I know this is a terribly simple question, but the docs seem to be > designed for people who probably find a the answer to this question > terribly obvious. But its not at all obvious to me. > > I can't figure out why when I define a funct

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-22 Thread Aaron Brady
On Nov 22, 8:40 am, Joe Strout <[EMAIL PROTECTED]> wrote: > On Nov 22, 2008, at 4:08 AM, Aaron Brady wrote: > > > Furthermore, to apply c-b-v to Python, you have to > > introduce the concept of pointers, which is ostensibly non-native for > > human programmers. > > Not necessarily "pointers" per se

Re: Python 3 __cmp__ semantic change?

2008-11-22 Thread Steven D'Aprano
On Sat, 22 Nov 2008 09:10:04 +, Arnaud Delobelle wrote: > That's not surprising. You're measuring the wrong things. If you read > what I wrote, you'll see that I'm talking about Fraction.__gt__ being > slower (as it is defined in terms of Fraction.__eq__ and > Fraction.__lt__) using when my

Re: initialization in argument definitions

2008-11-22 Thread greg
George Sakkis wrote: Don't worry, it's not obvious to *anyone* new to Python (and many not- so-new for that matter). That's by no means certain, because we only hear from the people who guessed the wrong way. We have no way of knowing how many people guessed the right way. -- Greg -- http://m

Re: Re: how to get all repeated group with regular expression

2008-11-22 Thread Jeremiah Dodds
On Fri, Nov 21, 2008 at 9:12 PM, scsoce <[EMAIL PROTECTED]> wrote: > MRAB wrote: > >> Steve Holden >> wrote: >> >>> Please keep this on the list. >>> >>> scsoce wrote: >>> Steve Holden wrote: > scsoce wrote: > > >> say, when I try to search and match every char from vari

Re: how to dynamically instantiate an object inheriting from several classes?

2008-11-22 Thread George Sakkis
On Nov 22, 9:32 am, Joe Strout <[EMAIL PROTECTED]> wrote: > On Nov 21, 2008, at 7:02 PM, Steven D'Aprano wrote: > > >> I have a function that takes a reference to a class, > > > Hmmm... how do you do that from Python code? The simplest way I can   > > think > > of is to extract the name of the clas

Re: Feedback

2008-11-22 Thread Benjamin Kaplan
Idle is not a command line shell, it is the python interactive interpreter. If you want to run your program in a command line, open a real command line (cmd.exe) and cd to whatever directory you put helloworld.py in. Then type "python helloworld.py". 2008/11/21 Ali art <[EMAIL PROTECTED]> > I am

Re: Feedback

2008-11-22 Thread MRAB
Ali art wrote: I am using Windows XP professional version 2002 Service pack 3. AMD Athlon(TM)XP 2400+ 2.00GHz 992MB RAM. I have download Windows x86 MSI Instaler (3.0rc2) Python 3.0rc2 Release: 06-Nov-2008. I want to use source code file from Python Command line but I could not. Firstly i op

CHASE CREDIT CARDS

2008-11-22 Thread LUDLAM
Compare and choose the best Chase credit card for your needs http://chasecreditcardsnews.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python / Debian package dependencies

2008-11-22 Thread Paul Boddie
On 21 Nov, 23:09, Steven Samuel Cole <[EMAIL PROTECTED]> wrote: > > 1. I must use a 'higher-level' tool than dpkg to install the package > which automatically resolves and installs dependency packages. There has > got to be a way to use apt-get for .deb files which do not reside > (yet) in a repo

And now for something completely different ...

2008-11-22 Thread Christian Heimes
To whom it might concern. Monty Python has opened an official Monty Python channel on Youtube. http://www.youtube.com/user/MontyPython High quality Monty Python movies - powered by Python :) Have fun! Christian -- http://mail.python.org/mailman/listinfo/python-list

Feedback

2008-11-22 Thread Ali art
I am using Windows XP professional version 2002 Service pack 3. AMD Athlon(TM)XP 2400+ 2.00GHz 992MB RAM.I have download Windows x86 MSI Instaler (3.0rc2) Python 3.0rc2 Release: 06-Nov-2008. I want to use source code file from Python Command line but I could not. Firstly i opened IDLE and cli

Re: how to dynamically instantiate an object inheriting from several classes?

2008-11-22 Thread Steven D'Aprano
On Sat, 22 Nov 2008 07:32:07 -0700, Joe Strout wrote: > On Nov 21, 2008, at 7:02 PM, Steven D'Aprano wrote: > >>> I have a function that takes a reference to a class, >> >> Hmmm... how do you do that from Python code? The simplest way I can >> think >> of is to extract the name of the class, and

Re: Custom Formatting The Output Of subprocess.Popen

2008-11-22 Thread thedsadude
> regards >  Steve > -- > Steve Holden        +1 571 484 6266   +1 800 494 3119 > Holden Web LLC              http://www.holdenweb.com/ Thanks all for your help! Bye, TD -- http://mail.python.org/mailman/listinfo/python-list

Re: Module not included when running "setup.py sdist"

2008-11-22 Thread Martin v. Löwis
> I did not see "wyzard.py" anywhere in there, so I copied wyzard.py to > "~/Code/distrib/wyzard" (so that it was living next to the setup > script), deleted the tarball created by the first try, and ran > "setup.py sdist" again. It still hadn't copied to the tarball. I tried > again several times,

Re: how to dynamically instantiate an object inheriting from several classes?

2008-11-22 Thread Arnaud Delobelle
Joe Strout <[EMAIL PROTECTED]> writes: > On Nov 21, 2008, at 7:02 PM, Steven D'Aprano wrote: > >>> I have a function that takes a reference to a class, >> >> Hmmm... how do you do that from Python code? The simplest way I can >> think >> of is to extract the name of the class, and then pass the na

Re: Python 3 __cmp__ semantic change?

2008-11-22 Thread Colin J. Williams
Johannes Bauer wrote: Steve Holden schrieb: If it's not present then it would be worth reporting it as a 3.0 bug - there's still time to get it in, as the release isn't due until early December. Seems it was removed on purpose - I'm sure there was a good reason for that, but may I ask why? In

Re: RELEASED Python 3.0rc3

2008-11-22 Thread Mensanator
On Nov 22, 9:32�am, [EMAIL PROTECTED] (Aahz) wrote: > In article <[EMAIL PROTECTED]>, > > Mensanator �<[EMAIL PROTECTED]> wrote: > > >So, if the IDLE from ActiveState comes up and says 2.6 (indicating > >final release), shouldn't the copywrite message also say 2.6 > >instead of 2.6rc1 as shown here

Re: Need help converting text to csv format

2008-11-22 Thread Chuck Connors
Firstly, I would like to thank those that offered help. I was able to get my data into the database and also have connectivity with the mysql and can pull the data in/out at will. Hooray and thanks again. Secondly, perhaps I overstated my abilities. I have written a couple of websites from scr

Re: Need help converting text to csv format

2008-11-22 Thread Thorsten Kampe
* Chuck Connors (Fri, 21 Nov 2008 08:10:09 -0800 (PST)) > Wow! What a change in direction from the previous post. Thank you > both for the help and the explanations. This will work great! No, it will not. For manipulating CSV data in Python you use the (*tada*) CSV module ("import csv"). The P

Re: RELEASED Python 3.0rc3

2008-11-22 Thread Steve Holden
Mensanator wrote: > On Nov 21, 9:06 am, Barry Warsaw <[EMAIL PROTECTED]> wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> On behalf of the Python development team and the Python community, I >> am happy to announce the third and last planned release candidate for >> Python 3.0.

Re: RELEASED Python 3.0rc3

2008-11-22 Thread Aahz
In article <[EMAIL PROTECTED]>, Mensanator <[EMAIL PROTECTED]> wrote: > >So, if the IDLE from ActiveState comes up and says 2.6 (indicating >final release), shouldn't the copywrite message also say 2.6 >instead of 2.6rc1 as shown here? That would be an "oops"; please file a bug report, we're goin

Re: Python 3 __cmp__ semantic change?

2008-11-22 Thread Aahz
In article <[EMAIL PROTECTED]>, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > >There's a very simple way of emulating Fraction.__cmp__ in Python 3: > >def totally_ordered(cls): >def __lt__(self, other): return self.cmp(other) < 0 >def __eq__(self, other): return self.cmp(other) == 0 >d

Re: Need help converting text to csv format

2008-11-22 Thread Steve Holden
John Machin wrote: > On Nov 22, 11:04 am, r0g <[EMAIL PROTECTED]> wrote: [...]>> If you can't muster even that level of enthusiasm or courtesy towards >> the noobs then you always have the option of not responding. > > Your "if X then Y" logic is somewhat cockeyed -- Y is true independent > of X.

Re: how to get all repeated group with regular expression

2008-11-22 Thread MRAB
scsoce wrote: MRAB wrote: Steve Holden wrote: Please keep this on the list. scsoce wrote: Steve Holden wrote: scsoce wrote: say, when I try to search and match every char from variable length string, such as string '123456', i tried re.findall( r'(\d)*, '12346' ) I think you will

Re: Module Structure/Import Design Problem

2008-11-22 Thread Steve Holden
Stef Mientki wrote: > Steve Holden wrote: >> Stef Mientki wrote: >> >>> Gabriel Genellina wrote: >>> >> [...] >> >>> Sorry I don't understand all that pep-talk (I'm not a programmer ;-) >>> >> >> And I'm not a plumber. The difference between us is that I don't write >> blogs telling p

Re: Modification of a urllib2 object ?

2008-11-22 Thread jowillia
On Oct 10, 10:57 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Oct 10, 6:12 pm, [EMAIL PROTECTED] wrote: > > > > > On Oct 10, 1:02 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > On Oct 10, 2:32 pm, [EMAIL PROTECTED] wrote: > > > > > I have several ways to the following problem. > > > > >

Module not included when running "setup.py sdist"

2008-11-22 Thread Leaf
I'm running Python 2.5.2 on Ubuntu Hardy. I'm trying to write a Distutils setup script to distribute and upload to PyPI a module I wrote called "Wyzard." My setup script looks like: setup(name='Wyzard', version='0.8', author='LeafStorm/Pacific Science', author_email='[EMAIL PROTE

Re: Very simple WSGI question

2008-11-22 Thread Manlio Perillo
Il Mon, 17 Nov 2008 01:35:19 +, Matthew Wilson ha scritto: > I want to write some middleware to notice when the inner app returns a > 500 status code. I'm sure there are already sophisticated loggers that > do this sort of thing, but I'm using this as a learning exercise. > > Right now, I wr

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-22 Thread Joe Strout
On Nov 22, 2008, at 4:08 AM, Aaron Brady wrote: Furthermore, to apply c-b-v to Python, you have to introduce the concept of pointers, which is ostensibly non-native for human programmers. Not necessarily "pointers" per se -- any type of object references will do, and yes, Python has those in

Re: how to dynamically instantiate an object inheriting from several classes?

2008-11-22 Thread Joe Strout
On Nov 21, 2008, at 7:02 PM, Steven D'Aprano wrote: I have a function that takes a reference to a class, Hmmm... how do you do that from Python code? The simplest way I can think of is to extract the name of the class, and then pass the name as a reference to the class, and hope it hasn't b

Re: Programming exercises/challenges

2008-11-22 Thread Michele Simionato
On Nov 20, 1:28 pm, [EMAIL PROTECTED] wrote: >     >> a diary manager compatible with my Emacs diary file (sometimes I >     >> don't want to open Emacs for a quick note) > >     Arnaud> You mean that you sometimes don't have emacs open? > > I am constantly amazed at work that people open a separat

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-22 Thread Aaron Brady
On Nov 21, 8:53 pm, greg <[EMAIL PROTECTED]> wrote: > Aaron Brady wrote: > > Call-by-value has other characteristics that Python does not > > meet. > > The designers of most other dynamic languages don't > seem to share that opinion, since they use the term > call-by-value just as though it *does*

Re: Dynamic features used

2008-11-22 Thread Aaron Brady
On Nov 21, 3:17 am, [EMAIL PROTECTED] wrote: snip > Compared to other languages Python generally allows me to write a > correctly working program in the shorter time (probably because of the > Python shell, the built-in safeties, the doctests, the clean and short > and handy syntax, the quick write

Re: Python 3 __cmp__ semantic change?

2008-11-22 Thread Arnaud Delobelle
Arnaud Delobelle <[EMAIL PROTECTED]> writes: > I haven't done any tests but as Fraction.__gt__ calls *both* > Fraction.__eq__ and Fraction.__lt__ it is obvious that it is going to be > roughly twice as slow. There's a very simple way of emulating Fraction.__cmp__ in Python 3: def totally_ordered

Re: Programming exercises/challenges

2008-11-22 Thread Ken
How about this: http://www.pythonchallenge.com/ <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi guys, > > I'm learning Python by teaching myself, and after going through several > tutorials I feel like I've learned the basics. Since I'm not taking a > class or anything, I've

Re: Python 3 __cmp__ semantic change?

2008-11-22 Thread Arnaud Delobelle
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Sat, 22 Nov 2008 08:27:59 +, Arnaud Delobelle wrote: > Granted it's not as efficient as a __cmp__ function. >>> >>> What makes you say that? What do you mean by "efficient"? Are you >>> talking about memory footprint, runtime speed, disk-sp

Re: Module Structure/Import Design Problem

2008-11-22 Thread Stef Mientki
Steve Holden wrote: Stef Mientki wrote: Gabriel Genellina wrote: [...] Sorry I don't understand all that pep-talk (I'm not a programmer ;-) And I'm not a plumber. The difference between us is that I don't write blogs telling people how to lay out and connect their pipework.

Re: Python 3 __cmp__ semantic change?

2008-11-22 Thread Steven D'Aprano
On Sat, 22 Nov 2008 08:27:59 +, Arnaud Delobelle wrote: >>> Granted it's not as efficient as a __cmp__ function. >> >> What makes you say that? What do you mean by "efficient"? Are you >> talking about memory footprint, runtime speed, disk-space, programmer >> efficiency, algorithmic complexit

Chase credit cards HERE ALL

2008-11-22 Thread BUSHRA
Chase Credit Cards & CreditCard Offers at CreditCardFlyers http://www.chasecreditcardsnews.50webs.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3 __cmp__ semantic change?

2008-11-22 Thread Arnaud Delobelle
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Fri, 21 Nov 2008 17:26:21 +, Arnaud Delobelle wrote: > > [...] >> As classes can be decorated in Python 3, you can write a decorator to >> make a class totally ordered. Here is a very simplified proof of >> concept such decorator: >> >> def to

Re: Programming exercises/challenges

2008-11-22 Thread Arnaud Delobelle
Edwin <[EMAIL PROTECTED]> writes: > I have to point out that I myself use Vim more than > Emacs. Not because I think it's better (I'm not a religious person) > but because it has better integration with my Mac... and actually, I > use them for different programming tasks. I'm only a very occasion