sending a file chunk by chunk instead as a whole to a web server

2010-08-01 Thread Sanjeeb
Hi, I have a web client which send a file to a server as multipart form data, the sending of data is from http://code.activestate.com/recipes/146306-http-client-to-post-using-multipartform-data/. I dont want to open the whole file to memory(at cliend end) and then send, i just want to send part by

RE: The untimely dimise of a weak-reference

2010-08-01 Thread Vincent van Beveren
Hi Christiaan, > Instances of a class have no means of storing the bound method object. > The or unbound bound method is a simple and small wrapper that keeps a > reference to the class, "self" and the function object. Python keeps a > pool of empty method objects in a free list. The creation of

RE: The untimely dimise of a weak-reference

2010-08-01 Thread Vincent van Beveren
Hi Gregory, > You can create your own wrapper that keeps a weak reference to > the underlying object. Here's an example. > [...] Thanks for the code! Regards, Vincent -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to set a cookie within a python script

2010-08-01 Thread Νίκος
If you just click in my web page to see the script run in action due to the cgitb module i use it will provide you both the source code that the error appears and the error as well. All you have to do is click here: http://www.webville.gr/cgi-bin/koukos.py As for the encoding why when i print gre

Re: Builtn super() function. How to use it with multiple inheritance? And why should I use it at all?

2010-08-01 Thread Paul Rubin
Michele Simionato writes: > I am actually more radical than that. From > http://www.artima.com/weblogs/viewpost.jsp?thread=237121: > In this series I have argued that super is tricky; I think nobody can... When I look at that URL, I see a Java stack dump: java.lang.RuntimeException: com.jives

Re: Builtn super() function. How to use it with multiple inheritance? And why should I use it at all?

2010-08-01 Thread Michele Simionato
On Jul 31, 5:08 am, Steven D'Aprano wrote: > I have read Michelle Simionato's articles on super in Python. One "l" please! I am a man! ;-) > > But Michelle is wrong to conclude that the problem lies with the concept > of *superclass*. The problem lies with the idea that there is ONE > superclass

Merging two dictionaries

2010-08-01 Thread Douglas Garstang
Anyone, I have the two dictionaries below. How can I merge them, such that: 1. The cluster dictionary contains the additional elements from the default dictionary. 2. Nothing is removed from the cluster dictionary. The idea here is that the two dictionaries are read from different files where, i

Re: Why is python not written in C++ ?

2010-08-01 Thread Michael Torrie
On 08/01/2010 07:09 PM, John Bokma wrote: >> One thing that comes to mind is that it's much easier to distribute C >> libraries than C++ libraries. > > In the beginning of C++ there were programs that just converted C++ to C > (frontends). At least that is how the C++ compiler Acorn sold worked.

Re: Why is python not written in C++ ?

2010-08-01 Thread Tomasz Rola
On Sun, 1 Aug 2010, Albert Hopkins wrote: > C seems to be a good, portable language for writing interpreters and > compilers. And one should not forget about performance. C++ was for a long time behind C, and even now some parts (like iostreams) should be avoided in fast code. BTW, C++ can be

Re: Docstrings and PEP 3174

2010-08-01 Thread Steven D'Aprano
On Sun, 01 Aug 2010 20:30:22 +1200, Gregory Ewing wrote: > Steven D'Aprano wrote: > >> If you mean a runtime optimization with no change to the source file, >> then maybe, tell me more. > > Note that you don't necessarily need a separate file for this. It could > just be a separate part of the s

Re: Trying to set a cookie within a python script

2010-08-01 Thread Steven D'Aprano
On Sun, 01 Aug 2010 19:16:29 -0700, Νίκος wrote: >>On 2 Αύγ, 03:52, Steven D'Aprano >>wrote: > >> Neither do I. What makes you think there is an error? What sort of >> error? Do you get a core dump, an exception, or something else? >> >> Please report what you get, and what you expect, and how t

Re: how best to clear objects from a frame

2010-08-01 Thread rantingrick
On Aug 1, 7:12 pm, Chris Hare wrote: > Here is the situation: > > I have a window with a bunch of widgets in it.  I want to clear the objects > in a given frame and recreate them to update them.   You need to check out the "w.update" and "w.update_idletasks" methods available on all Tkinter widg

Re: [Python-Dev] [RELEASED] Python 3.2 alpha 1

2010-08-01 Thread Benjamin Peterson
Hey, Georg! Congrats on your first release! 2010/8/1 Georg Brandl : > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On behalf of the Python development team, I'm happy to announce the > first alpha preview release of Python 3.2. > > Python 3.2 is a continuation of the efforts to improve and

Re: Trying to set a cookie within a python script

2010-08-01 Thread MRAB
Νίκος wrote: Also my greek print appear in funny encoding although i do use # -*- coding: utf-8 -*- That line just tells Python what encoding the source file itself uses. It doesn't affect what the program does or how it runs. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is python not written in C++ ?

2010-08-01 Thread Albert Hopkins
On Mon, 2010-08-02 at 01:08 +0200, candide wrote: > Python is an object oriented langage (OOL). The Python main > implementation is written in pure and "old" C90. Is it for historical > reasons? > > C is not an OOL and C++ strongly is. I wonder if it wouldn't be more > suitable to implement an

Re: Docstrings and PEP 3174

2010-08-01 Thread Carl Banks
On Aug 1, 4:26 pm, Terry Reedy wrote: > On 8/1/2010 4:30 AM, Gregory Ewing wrote: > > > Steven D'Aprano wrote: > > >> If you mean a runtime optimization with no change to the source file, > >> then maybe, tell me more. > > > Note that you don't necessarily need a separate file for this. > > It cou

Re: Trying to set a cookie within a python script

2010-08-01 Thread Νίκος
Also my greek print appear in funny encoding although i do use # -*- coding: utf-8 -*- -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to set a cookie within a python script

2010-08-01 Thread Νίκος
>On 2 Αύγ, 03:52, Steven D'Aprano wrote: > Neither do I. What makes you think there is an error? What sort of error? > Do you get a core dump, an exception, or something else? > > Please report what you get, and what you expect, and how they are > different. Hello Steven, Here is the script whe

co_firstlineno on decorated functions

2010-08-01 Thread Eli Bendersky
Hello, I've been tinkering with __code__.co_firstlineno for testing the trace.py module (Python Issue 9315), and ran into an interesting problem. Consider this code: def dummydecorator(f): return f def foo(a): return a @dummydecorator def bar(a): return a if __name__ == "__main__

Re: Why is python not written in C++ ?

2010-08-01 Thread Carl Banks
On Aug 1, 6:09 pm, John Bokma wrote: > Roy Smith writes: > > In article <4c55fe82$0$9111$426a3...@news.free.fr>, > >  candide wrote: > > >> Python is an object oriented langage (OOL). The Python main > >> implementation is written in pure and "old" C90. Is it for historical > >> reasons? > > >>

Re: Why is python not written in C++ ?

2010-08-01 Thread Tomasz Rola
On Sun, 1 Aug 2010, John Bokma wrote: > In the beginning of C++ there were programs that just converted C++ to C > (frontends). At least that is how the C++ compiler Acorn sold worked. > So I don't think your argument was much true back then. Those that I (tried to) used on Amiga were based aroun

Re: beginner python GUI question

2010-08-01 Thread rechardchen
于 2010-8-2 6:15, Chris Hare 写道: I hope I can explain this correctly. I have a GUI, which is already being processed by a mainloop. I want to be able to open a second window so the user can interact with specific information in the second window. I pulled together this code example from Tkin

Re: Problem with Elementtree and XMLSchem instance type

2010-08-01 Thread Carl Banks
On Aug 1, 5:43 pm, Lawrence D'Oliveiro wrote: > In message > <96e47fd8-c939-48a2-9a2b-92afa720c...@k1g2000prl.googlegroups.com>, Carl > > Banks wrote: > > My general feeling is that ElementTree is a lot handier for reading > > and writing your own XML formats, than for handling XML files produced

Re: Why is python not written in C++ ?

2010-08-01 Thread Christian Heimes
Am 02.08.2010 01:08, schrieb candide: > Python is an object oriented langage (OOL). The Python main > implementation is written in pure and "old" C90. Is it for historical > reasons? Python is written in C89 to support as many platforms as possible. We deliberately don't use any new features and

How to catch windows shutdown/reboot message

2010-08-01 Thread rechardchen
I'm writing a python script which runs as a windowsxp service. The problem is how to catch the windows shutdown/reboot message and do some cleaning job when system is going down? The atexit module and signal module on windows dont seems to work. I guess the python win32api may be of help, but I am

Re: Why is python not written in C++ ?

2010-08-01 Thread John Bokma
Roy Smith writes: > In article <4c55fe82$0$9111$426a3...@news.free.fr>, > candide wrote: > >> Python is an object oriented langage (OOL). The Python main >> implementation is written in pure and "old" C90. Is it for historical >> reasons? >> >> C is not an OOL and C++ strongly is. I wonder i

Re: Why is python not written in C++ ?

2010-08-01 Thread John Bokma
Terry Reedy writes: > On 8/1/2010 7:08 PM, candide wrote: >> Python is an object oriented langage (OOL). The Python main >> implementation is written in pure and "old" C90. Is it for historical >> reasons? > > Python was first released before C++. C++ was named C++ in 1983 (development on it st

Re: how can I solve this erorr usr/lib/python2.6 : permisson denied

2010-08-01 Thread Steven D'Aprano
On Sun, 01 Aug 2010 05:05:39 -0700, Mohseniaref wrote: > Dear Friend > I have this erorr after running pyhon script with header > /usr/lib/python2.6 : permisson denied I change ownership with -hR in > super user terminal Please COPY AND PASTE (do NOT retype them): (1) the header from the script

timeit function

2010-08-01 Thread Mag Gam
Currently, I have a bash shell script which does timing for me. For example, if I have a Unix Command I typically run time against it for 10 times and then get an average. It works fine but I have to write a post processing script to get the time and then do a graph on matplotlib. I was wondering

Re: Trying to set a cookie within a python script

2010-08-01 Thread Steven D'Aprano
On Sun, 01 Aug 2010 09:56:48 -0700, Νίκος wrote: > Hello fellow Python Coders! > > I don't see the error in my attempt to set a a cookie in this test > script. Neither do I. What makes you think there is an error? What sort of error? Do you get a core dump, an exception, or something else? Pl

Re: Problem with Elementtree and XMLSchem instance type

2010-08-01 Thread Lawrence D'Oliveiro
In message <96e47fd8-c939-48a2-9a2b-92afa720c...@k1g2000prl.googlegroups.com>, Carl Banks wrote: > My general feeling is that ElementTree is a lot handier for reading > and writing your own XML formats, than for handling XML files produced > by other tools. Why is that? I’ve successfully used it

Re: Normalizing A Vector

2010-08-01 Thread Lawrence D'Oliveiro
In message <87k4oah1rp@dpt-info.u-strasbg.fr>, Alain Ketterlin wrote: > Lawrence D'Oliveiro writes: > >> No, I deliberately put it in that order to ensure that the value for l >> can only ever be evaulated once. > > Try this (essentially equivalent to your code): > > def f(): > print "

Re: Why is python not written in C++ ?

2010-08-01 Thread Roy Smith
In article <4c55fe82$0$9111$426a3...@news.free.fr>, candide wrote: > Python is an object oriented langage (OOL). The Python main > implementation is written in pure and "old" C90. Is it for historical > reasons? > > C is not an OOL and C++ strongly is. I wonder if it wouldn't be more > suita

how best to clear objects from a frame

2010-08-01 Thread Chris Hare
Here is the situation: I have a window with a bunch of widgets in it. I want to clear the objects in a given frame and recreate them to update them. The example below destroys the top level frame, and so I can't recreate the widgets. I am likely doing this wrong. should I be doing this in a

Re: Why is python not written in C++ ?

2010-08-01 Thread Terry Reedy
On 8/1/2010 7:08 PM, candide wrote: Python is an object oriented langage (OOL). The Python main implementation is written in pure and "old" C90. Is it for historical reasons? Python was first released before C++. C is available on, and hence Python runs on, systems that do not have C++ availab

Re: Normalizing A Vector

2010-08-01 Thread Matteo Landi
On Mon, Aug 2, 2010 at 1:50 AM, Terry Reedy wrote: > On 7/30/2010 7:46 AM, Lawrence D'Oliveiro wrote: >> >> Say a vector V is a tuple of 3 numbers, not all zero. You want to >> normalize >> it (scale all components by the same factor) so its magnitude is 1. >> >> The usual way is something like th

Re: Why is python not written in C++ ?

2010-08-01 Thread Stephen Hansen
On 8/1/10 4:08 PM, candide wrote: > Python is an object oriented langage (OOL). The Python main > implementation is written in pure and "old" C90. Is it for historical > reasons? Portability if nothing else has been a strong reason to keep the Python implementation to standard C. Its not as bad as

Re: Normalizing A Vector

2010-08-01 Thread Terry Reedy
On 7/30/2010 7:46 AM, Lawrence D'Oliveiro wrote: Say a vector V is a tuple of 3 numbers, not all zero. You want to normalize it (scale all components by the same factor) so its magnitude is 1. The usual way is something like this: L = math.sqrt(V[0] * V[0] + V[1] * V[1] + V[2] * V[2])

Re: how python works

2010-08-01 Thread Terry Reedy
On 7/30/2010 2:16 PM, Mahmood Naderan wrote: So is it a compiler or interpreter? Python is a language. It does not 'work' in the sense of your subject line. CPython is a Python compiler/interpreter, as described. When loaded, it may be named python.exe, depending on system and installation.

Re: Docstrings and PEP 3174

2010-08-01 Thread Terry Reedy
On 8/1/2010 4:30 AM, Gregory Ewing wrote: Steven D'Aprano wrote: If you mean a runtime optimization with no change to the source file, then maybe, tell me more. Note that you don't necessarily need a separate file for this. It could just be a separate part of the same file. Which is to say,

Re: image resize doesn't work

2010-08-01 Thread Chris Hare
Thanks Peter - I know what I said sounded stupid :-) I have been working with Python for a week and as you know sometimes it is easier to learn by seeing what you did wrong as compared to what should have been done with the same example. I loved your code by the way - Thanks for help just ano

Why is python not written in C++ ?

2010-08-01 Thread candide
Python is an object oriented langage (OOL). The Python main implementation is written in pure and "old" C90. Is it for historical reasons? C is not an OOL and C++ strongly is. I wonder if it wouldn't be more suitable to implement an OOL with another one. Has it ever been planned to rewrite i

Re: image resize doesn't work

2010-08-01 Thread Chris Hare
And I see now what I did wrong - thanks for putting up with the questions. On Aug 1, 2010, at 4:32 PM, Peter Otten wrote: > Chris Hare wrote: > >> Thanks for the help. My one week of python is getting a workout. >> >> I have shortened it all down and made it a standalone example, using yours >

beginner python GUI question

2010-08-01 Thread Chris Hare
I hope I can explain this correctly. I have a GUI, which is already being processed by a mainloop. I want to be able to open a second window so the user can interact with specific information in the second window. I pulled together this code example from Tkinter import * class Net: d

Re: image resize doesn't work

2010-08-01 Thread Peter Otten
Chris Hare wrote: > Thanks for the help. My one week of python is getting a workout. > > I have shortened it all down and made it a standalone example, using yours > as a model. Your example, works, but it will take a lot of effort to > retrofit it into the code I have. (which is maybe not a b

exception handling with sqlite db errors

2010-08-01 Thread CM
I am using SQLite with Python 2.5 for an app and every now and then get an error when trying to write to the database. So far I haven't been careful about noting these down, but now I would like to address them. The two errors I've noticed are: 1) "database is locked" errors (probably due to wri

Re: image resize doesn't work

2010-08-01 Thread Chris Hare
On Aug 1, 2010, at 1:08 PM, Peter Otten wrote: > Chris Hare wrote: > > >> On Aug 1, 2010, at 10:24 AM, rantingrick wrote: >> >>> On Aug 1, 7:35 am, Chris Hare wrote: I have the following chunk of code. Although it seems to execute fine, no errors >>> >>> Not True! it contains synt

Re: default behavior

2010-08-01 Thread John Posner
On 7/31/2010 2:00 PM, Christian Heimes wrote: Your answer is confusing even me. ;) Yeah, I get that a lot. :-) Let me try an easier to understand explanation. defaultdict *implements* __missing__() to provide the default dict behavior. In my experience, the word *implements* is commonly u

Re: image resize doesn't work

2010-08-01 Thread Peter Otten
Chris Hare wrote: > On Aug 1, 2010, at 10:24 AM, rantingrick wrote: > >> On Aug 1, 7:35 am, Chris Hare wrote: >>> I have the following chunk of code. Although it seems to execute fine, >>> no errors >> >> Not True! it contains syntax errors. Check the posted code and next >> time post all th

Re: let optionparse.Optionparser ignore unknown command line switches.

2010-08-01 Thread Jon Clements
On 1 Aug, 16:43, News123 wrote: > On 08/01/2010 05:34 PM, Steven W. Orr wrote: > > > > > On 08/01/10 07:27, quoth News123: > >> On 08/01/2010 01:08 PM, News123 wrote: > >>> I wondered, whether there's a simple/standard way to let > >>> the Optionparser just ignore unknown command line switches. >

Trying to set a cookie within a python script

2010-08-01 Thread Νίκος
Hello fellow Python Coders! I don't see the error in my attempt to set a a cookie in this test script. Can you help please?! Thank you! [code] #!/usr/bin/python # -*- coding: utf-8 -*- import Cookie print ( "Content-type: text/html\n" ) cookie = Cookie.SimpleCookie() if cookie.has_key('visito

Re: let optionparse.Optionparser ignore unknown command line switches.

2010-08-01 Thread News123
On 08/01/2010 05:34 PM, Steven W. Orr wrote: > On 08/01/10 07:27, quoth News123: >> On 08/01/2010 01:08 PM, News123 wrote: >>> I wondered, whether there's a simple/standard way to let >>> the Optionparser just ignore unknown command line switches. >>> >> >> In order to illustrate, what I try to ac

Google job leads

2010-08-01 Thread Charles Jo
Dear Colleagues, I recently started a recruiter project at Google and am working with Partner Solutions Organization and recruiting Technical Account Managers for the group so I am actively networking with those who may know great software engineers with client-facing experience (or wanting to

Re: image resize doesn't work

2010-08-01 Thread Chris Hare
On Aug 1, 2010, at 10:24 AM, rantingrick wrote: > On Aug 1, 7:35 am, Chris Hare wrote: >> I have the following chunk of code. Although it seems to execute fine, no >> errors > > Not True! it contains syntax errors. Check the posted code and next > time post all the code. > -- > http://mail.p

Re: let optionparse.Optionparser ignore unknown command line switches.

2010-08-01 Thread Steven W. Orr
On 08/01/10 07:27, quoth News123: > On 08/01/2010 01:08 PM, News123 wrote: >> I wondered, whether there's a simple/standard way to let >> the Optionparser just ignore unknown command line switches. >> > > In order to illustrate, what I try to achieve: > > > import optparse > parser = optparse.O

Re: image resize doesn't work

2010-08-01 Thread rantingrick
On Aug 1, 7:35 am, Chris Hare wrote: > I have the following chunk of code.  Although it seems to execute fine, no > errors Not True! it contains syntax errors. Check the posted code and next time post all the code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Normalizing A Vector

2010-08-01 Thread Alain Ketterlin
Lawrence D'Oliveiro writes: >>> V = tuple \ >>> ( >>> x >>> / >>> l >>>for x in V >>>for l in >>>(math.sqrt(reduce(lambda a, b : a + b, (y * y for y in V), >>>0)),) >>> ) >> >> You got the order wrong (it has

Re: Parse a string into argv-like list like OS does

2010-08-01 Thread python
Tim, > Sounds like the shlex module... > http://docs.python.org/library/shlex.html Cheers for the link - that's *exactly* what I was searching for. For the archives: Here's an excellent tutorial on this module. http://www.oreillynet.com/onlamp/blog/2007/10/pymotw_shlex.html Malcolm -- http://m

Re: how can I solve this erorr usr/lib/python2.6 : permisson denied

2010-08-01 Thread Andrea Crotti
Mohseniaref writes: > Dear Friend > I have this erorr after running pyhon script with header > /usr/lib/python2.6 : permisson denied > I change ownership with -hR in super user terminal Why /usr/lib... and not in bin? I guess this is the directory, of course if you put it in the header (shabang)

Re: Parse a string into argv-like list like OS does

2010-08-01 Thread Tim Chase
On 08/01/10 08:12, pyt...@bdurham.com wrote: Before I reinvent the wheel, is there a module that provides a command-line like parser that I can use? By command-line like parser, I mean that I would like to pass a string to this function and get back a list in the same manner as the OS receives a

Parse a string into argv-like list like OS does

2010-08-01 Thread python
Before I reinvent the wheel, is there a module that provides a command-line like parser that I can use? By command-line like parser, I mean that I would like to pass a string to this function and get back a list in the same manner as the OS receives a command line string which it parses into discre

Re: Why is there no platform independent way of clearing a terminal?

2010-08-01 Thread Roy Smith
In article , Lawrence D'Oliveiro wrote: > In message <8bkosifpi...@mid.individual.net>, Gregory Ewing wrote: > > > Don't you just leave the machine on overnight and wait > > for Microsoft to download all the stuff they think > > you should be using? > > That’s fine, but it doesn’t handle t

image resize doesn't work

2010-08-01 Thread Chris Hare
I have the following chunk of code. Although it seems to execute fine, no errors, the image is never resized. What am I missing? imagePNG = Image.open("image.png") photo = ImageTk.PhotoImage(imagePNG canvasWidth = 300 canvasHeight

class doesn't open its window - newbie question

2010-08-01 Thread Chris Hare
I am a newbie to python, but not programming. I have a menubar item displaySubMenu.add_command(label="External", command=externalDisplay) externalDisplay is a new class, which I have already imported. The class is here: from Tkinter import * from datetime import datetime, date, time import u

how can I solve this erorr usr/lib/python2.6 : permisson denied

2010-08-01 Thread Mohseniaref
Dear Friend I have this erorr after running pyhon script with header /usr/lib/python2.6 : permisson denied I change ownership with -hR in super user terminal -- http://mail.python.org/mailman/listinfo/python-list

Re: let optionparse.Optionparser ignore unknown command line switches.

2010-08-01 Thread News123
On 08/01/2010 01:08 PM, News123 wrote: > I wondered, whether there's a simple/standard way to let > the Optionparser just ignore unknown command line switches. > In order to illustrate, what I try to achieve: import optparse parser = optparse.OptionParser() parser.add_option("-t","--test",des

Re: Why is there no platform independent way of clearing a terminal?

2010-08-01 Thread Lawrence D'Oliveiro
In message , Mark Lawrence wrote: > On 01/08/2010 08:18, Lawrence D'Oliveiro wrote: > >> In message, Mark >> Lawrence wrote: >> >>> On 01/08/2010 07:50, Lawrence D'Oliveiro wrote: >>> In message, Mark Lawrence wrote: > Personally I find double clicking on an msi file rather eas

let optionparse.Optionparser ignore unknown command line switches.

2010-08-01 Thread News123
I wondered, whether there's a simple/standard way to let the Optionparser just ignore unknown command line switches. thanks in advance for any ideas -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2 test fails (2.7, linux)

2010-08-01 Thread guandalino
On 22 Lug, 01:13, Terry Reedy wrote: > If you do not get an answer here, file a bug report. If you can, put > orsenthil,benjamin.peterson,ezio.melotti > on the nosy list, as they are recent committers to this file. Say I said > to do so if you want. Add tjreedy also so I can see responses and lea

Re: Normalizing A Vector

2010-08-01 Thread Thomas Jollans
On 08/01/2010 03:41 AM, Lawrence D'Oliveiro wrote: > In message <87sk2zhpcj@dpt-info.u-strasbg.fr>, Alain Ketterlin wrote: > >> Lawrence D'Oliveiro writes: >> >>> V = tuple \ >>> ( >>> x >>> / >>> l >>>for x in V >>>for l in >>>

Re: Why is there no platform independent way of clearing a terminal?

2010-08-01 Thread Tim Harig
On 2010-08-01, Mark Lawrence wrote: > On 01/08/2010 06:17, Tim Harig wrote: >> On 2010-08-01, Lawrence D'Oliveiro wrote: >>> In message, Tim Harig wrote: >>> It would be rewarding as it would make writing cross-platform charactor mode applications possible. >>> >>> I thought Windows use

Re: pylint scores

2010-08-01 Thread News123
Hi, On 07/31/2010 11:04 AM, Matteo Landi wrote: > What are the messages one should really care about while evaluating > its code using pylint? It's easy to get 5 scored with a "lot of public > methods" or bad named variables such as 'x' or 'y' .. Have you got any > config file to share? The mos

Re: Why is there no platform independent way of clearing a terminal?

2010-08-01 Thread Lawrence D'Oliveiro
In message <8bkosifpi...@mid.individual.net>, Gregory Ewing wrote: > Don't you just leave the machine on overnight and wait > for Microsoft to download all the stuff they think > you should be using? That’s fine, but it doesn’t handle the non-Microsoft stuff. -- http://mail.python.org/mailman/li

[RELEASED] Python 3.2 alpha 1

2010-08-01 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm happy to announce the first alpha preview release of Python 3.2. Python 3.2 is a continuation of the efforts to improve and stabilize the Python 3.x line. Since the final release of Python 2.7, the 2.x li

Re: Docstrings and PEP 3174

2010-08-01 Thread Gregory Ewing
Steven D'Aprano wrote: If you mean a runtime optimization with no change to the source file, then maybe, tell me more. Note that you don't necessarily need a separate file for this. It could just be a separate part of the same file. -- Greg -- http://mail.python.org/mailman/listinfo/python-li

Re: Why is there no platform independent way of clearing a terminal?

2010-08-01 Thread Gregory Ewing
Lawrence D'Oliveiro wrote: How many .msi files would you have to click on to achieve the Windows equivalent? Don't you just leave the machine on overnight and wait for Microsoft to download all the stuff they think you should be using? -- Greg -- http://mail.python.org/mailman/listinfo/python

Re: Builtn super() function. How to use it with multiple inheritance? And why should I use it at all?

2010-08-01 Thread Gregory Ewing
Steven D'Aprano wrote: super(C, self) shouldn't be interpreted as "call C's superclasses from self". It means "starting just after C in the MRO, call self.__class__'s superclasses". My contention is that nobody has any chance of guessing what it does based on the name "super". Superness does

Re: Why is there no platform independent way of clearing a terminal?

2010-08-01 Thread Mark Lawrence
On 01/08/2010 08:18, Lawrence D'Oliveiro wrote: In message, Mark Lawrence wrote: On 01/08/2010 07:50, Lawrence D'Oliveiro wrote: In message, Mark Lawrence wrote: Personally I find double clicking on an msi file rather easier. Easier than apt-get dist-upgrade? I'm sorry but I only do Eng

Re: Builtn super() function. How to use it with multiple inheritance? And why should I use it at all?

2010-08-01 Thread Steven D'Aprano
On Sat, 31 Jul 2010 13:29:25 +, Brian Victor wrote: > Steven D'Aprano wrote: >> On Sat, 31 Jul 2010 14:25:39 +1200, Gregory Ewing wrote: >> >>> Steven D'Aprano wrote: >>> A / \ C B \ / D / \ E F Yes, a super

Re: Why is there no platform independent way of clearing a terminal?

2010-08-01 Thread Lawrence D'Oliveiro
In message , Mark Lawrence wrote: > On 01/08/2010 07:50, Lawrence D'Oliveiro wrote: > >> In message, Mark >> Lawrence wrote: >> >>> Personally I find double clicking on an msi file rather easier. >> >> Easier than apt-get dist-upgrade? > > I'm sorry but I only do English, could you please transl

Re: Docstrings and PEP 3174

2010-08-01 Thread Steven D'Aprano
On Sat, 31 Jul 2010 19:52:05 -0700, Carl Banks wrote: > PEP 3174 got me to thinking. > > There is now a subdirectory to deposit as many *.pyc files as you want > without cluttering the source directory (never mind the default case). > Which means you can pretty much write files with impunity. >

Re: Why is there no platform independent way of clearing a terminal?

2010-08-01 Thread Mark Lawrence
On 01/08/2010 07:50, Lawrence D'Oliveiro wrote: In message, Mark Lawrence wrote: Personally I find double clicking on an msi file rather easier. Easier than apt-get dist-upgrade? I'm sorry but I only do English, could you please translate. :) Mark Lawrence. -- http://mail.python.org/mailm