Re: Strong typing vs. strong testing

2010-09-29 Thread Erik Max Francis
Keith Thompson wrote: Erik Max Francis m...@alcyone.com writes: [...] print c # floating point accuracy aside 299792458.0 m/s Actually, the speed of light is exactly 299792458.0 m/s by definition. (The meter and the second are defined in terms of the same wavelength of light; this was

Re: Strong typing vs. strong testing

2010-09-29 Thread rustom
On Sep 29, 5:32 am, Chris Rebert c...@rebertia.com wrote: On Tue, Sep 28, 2010 at 2:55 AM, Malcolm McLean malcolm.mcle...@btinternet.com wrote: On Sep 27, 9:29 pm, p...@informatimago.com (Pascal J. Bourguignon) wrote: On the other hand, with the dynamic typing mindset, you might even

Re: partial sums problem

2010-09-29 Thread Chris Torek
In article i7trs4$9e...@reader1.panix.com kj no.em...@please.post wrote: The following attempt to get a list of partial sums fails: s = 0 [((s += t) and s) for t in range(1, 10)] File stdin, line 1 [((s += t) and s) for t in range(1, 10)] ^ SyntaxError: invalid syntax What's

Re: Strong typing vs. strong testing

2010-09-29 Thread Chris Rebert
On Tue, Sep 28, 2010 at 11:43 PM, rustom rustompm...@gmail.com wrote: On Sep 29, 5:32 am, Chris Rebert c...@rebertia.com wrote: On Tue, Sep 28, 2010 at 2:55 AM, Malcolm McLean malcolm.mcle...@btinternet.com wrote: On Sep 27, 9:29 pm, p...@informatimago.com (Pascal J. Bourguignon) wrote:

Re: Strong typing vs. strong testing

2010-09-29 Thread Rustom Mody
On Wed, Sep 29, 2010 at 12:44 PM, Chris Rebert c...@rebertia.com wrote: On Tue, Sep 28, 2010 at 11:43 PM, rustom rustompm...@gmail.com wrote: A currently developed language with units is curl: see http://developers.curl.com/userdocs/docs/en/dguide/quantities-basic.html Frink's most recent

Re: Upload files with wsgi

2010-09-29 Thread Richard Thomas
On Sep 28, 11:31 pm, Hidura hid...@gmail.com wrote: Hello, i have a project on Python3k, and i have a very big problem i don' t find how take an upload file i am using the wsgiref lib, and or theres any way to connect to the client in order to get the file by myself? Thank you Diego

File holes in Linux

2010-09-29 Thread Tom Potts
Hi, all. I'm not sure if this is a bug report, a feature request or what, so I'm posting it here first to see what people make of it. I was copying over a large number of files using shutil, and I noticed that the final files were taking up a lot more space than the originals; a bit more

Re: Strong typing vs. strong testing

2010-09-29 Thread Torsten Zühlsdorff
Keith Thompson schrieb: print c # floating point accuracy aside 299792458.0 m/s Actually, the speed of light is exactly 299792458.0 m/s by definition. Yes, but just in vacuum. Greetings, Torsten -- http://www.dddbl.de - ein Datenbank-Layer, der die Arbeit mit 8 verschiedenen

Paramiko and Threading

2010-09-29 Thread Jacob Abraham
Hi, Could someone help me understand how to using threading along with paramiko. For some reason only one of two of the threads returns the output correctly. Some of the threads returns an empty string as command output, but no errors are thrown. My attempt is pasted below. regards, Jacob

Certificate validation with HTTPSConnection

2010-09-29 Thread Velko Ivanov
Hello, I've always wandered why HTTPSConnection does not validate certificates? It is fairly simple to use the SSL socket's validation: class HTTPSConnection(HTTPConnection): This class allows communication via SSL. It is a copy of the http.client.HTTPSConnection with added certificate

Re: utf-8 and ctypes

2010-09-29 Thread Lawrence D'Oliveiro
In message mailman.1132.1285714474.29448.python-l...@python.org, Brendan Miller wrote: It seems that characters not in the ascii subset of UTF-8 are discarded by c_char_p during the conversion ... Not a chance. ... or at least they don't print out when I go to print the string. So it seems

Re: Nautilus Python

2010-09-29 Thread Lawrence D'Oliveiro
In message mailman.1101.1285626719.29448.python-l...@python.org, Eduardo Ribeiro wrote: But it doesn't work. What messages do you get? -- http://mail.python.org/mailman/listinfo/python-list

Re: Strong typing vs. strong testing

2010-09-29 Thread Pascal J. Bourguignon
George Neuner gneun...@comcast.net writes: On Tue, 28 Sep 2010 12:15:07 -0700, Keith Thompson ks...@mib.org wrote: George Neuner gneun...@comcast.net writes: On 28 Sep 2010 12:42:40 GMT, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: I would say the dimensional checking is underrated.

if the else short form

2010-09-29 Thread Tracubik
Hi all, I'm studying PyGTK tutorial and i've found this strange form: button = gtk.Button((False,, True,)[fill==True]) the label of button is True if fill==True, is False otherwise. i have googled for this form but i haven't found nothing, so can any of you pass me any reference/link to this

Re: Example or recomendation of a webserver

2010-09-29 Thread Diez B. Roggisch
Hidura hid...@gmail.com writes: I am working on a web project written on Py3k and using mod_wsgi on the Apache that have to recibes the request client via a xml structure and i am facing a lot of troubles with the upload files mainly because i can' t see where they are, so i' ve decide to

Re: if the else short form

2010-09-29 Thread Joost Molenaar
Hi Nico, it's converting fill==True to an int, thereby choosing the string False, or True, by indexing into the tuple. Try this in an interpreter: ['a','b'][False] 'a' ['a','b'][True] 'b' int(False) 0  int(True) 1 Joost On 29 September 2010 12:42, Tracubik affdfsdfds...@b.com wrote: Hi

Re: if the else short form

2010-09-29 Thread Tom Potts
This is just a sneaky shorthand, which is fine if that's what you want, but it makes it harder to read. The reason it works is that 'fill==True' is a boolean expression, which evaluates to True or False, but if you force a True into being an integer, it will be 1, and a False will become 0. Try

System idle time under Linux

2010-09-29 Thread Hugo Léveillé
I have found it for windows and mac, but no luck under linux. Any idea? Thanks -- Hugo Léveillé hu...@fastmail.net -- http://mail.python.org/mailman/listinfo/python-list

Re: if the else short form

2010-09-29 Thread Hrvoje Niksic
Tracubik affdfsdfds...@b.com writes: Hi all, I'm studying PyGTK tutorial and i've found this strange form: button = gtk.Button((False,, True,)[fill==True]) the label of button is True if fill==True, is False otherwise. The tutorial likely predates if/else expression syntax introduced in

scheduler or infinite loop

2010-09-29 Thread harryos
hi I am trying to write a program to read data from a site url. The program must read the data from site every 5 minutes. def get_data_from_site(pageurlstr): h=urllib.urlopen(pageurlstr) data=h.read() process_data(data) At first, I thought of using the sched module ,but then it

Re: scheduler or infinite loop

2010-09-29 Thread Nitin Pawar
why not schedule cron */5 * * * * and check in your code that previous execution was successful or not On Wed, Sep 29, 2010 at 5:29 PM, harryos oswald.ha...@gmail.com wrote: hi I am trying to write a program to read data from a site url. The program must read the data from site every 5

Re: About __class__ of an int literal

2010-09-29 Thread Steven D'Aprano
On Wed, 29 Sep 2010 02:20:55 +0100, MRAB wrote: On 29/09/2010 01:19, Terry Reedy wrote: A person using instances of a class should seldom use special names directly. They are, in a sense, implementation details, even if documented. The idiom if __name__ == '__main__': is an exception.

Re: list problem...

2010-09-29 Thread Steven D'Aprano
On Tue, 28 Sep 2010 20:11:51 +0100, Rog wrote: On Tue, 28 Sep 2010 11:59:08 -0700, geremy condra wrote: On Tue, Sep 28, 2010 at 11:44 AM, Rog r...@pynguins.com wrote: Hi all, Have been grappling with a list problem for hours... a = [2, 3, 4, 5,.] b = [4, 8, 2, 6,.] Basicly I am

Re: [Python-list] if the else short form

2010-09-29 Thread Brendan Simon (eTRIX)
On 29/09/10 9:20 PM, python-list-requ...@python.org wrote: Subject: if the else short form From: Tracubik affdfsdfds...@b.com Date: 29 Sep 2010 10:42:37 GMT To: python-list@python.org Hi all, I'm studying PyGTK tutorial and i've found this strange form: button = gtk.Button((False,,

Re: About __class__ of an int literal

2010-09-29 Thread Hrvoje Niksic
Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Wed, 29 Sep 2010 02:20:55 +0100, MRAB wrote: On 29/09/2010 01:19, Terry Reedy wrote: A person using instances of a class should seldom use special names directly. They are, in a sense, implementation details, even if

Re: list problem...

2010-09-29 Thread bruno.desthuilli...@gmail.com
On 29 sep, 14:17, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Tue, 28 Sep 2010 20:11:51 +0100, Rog wrote: On Tue, 28 Sep 2010 11:59:08 -0700, geremy condra wrote: On Tue, Sep 28, 2010 at 11:44 AM, Rog r...@pynguins.com wrote: Hi all, Have been grappling with a list

Re: Strong typing vs. strong testing

2010-09-29 Thread Paul Wallich
On 9/29/10 6:40 AM, Pascal J. Bourguignon wrote: George Neunergneun...@comcast.net writes: On Tue, 28 Sep 2010 12:15:07 -0700, Keith Thompsonks...@mib.org wrote: George Neunergneun...@comcast.net writes: On 28 Sep 2010 12:42:40 GMT, Albert van der Horst alb...@spenarnc.xs4all.nl wrote:

Re: if the else short form

2010-09-29 Thread bruno.desthuilli...@gmail.com
On 29 sep, 13:38, Hrvoje Niksic hnik...@xemacs.org wrote: Tracubik affdfsdfds...@b.com writes: button = gtk.Button((False,, True,)[fill==True]) (snip) BTW adding ==True to a boolean value is redundant and can even break for logically true values that don't compare equal to True (such as

Re: if the else short form

2010-09-29 Thread Alex Willmer
On Sep 29, 12:38 pm, Hrvoje Niksic hnik...@xemacs.org wrote: Tracubik affdfsdfds...@b.com writes: Hi all, I'm studying PyGTK tutorial and i've found this strange form: button = gtk.Button((False,, True,)[fill==True]) the label of button is True if fill==True, is False otherwise. The

Re: scheduler or infinite loop

2010-09-29 Thread Frank Millman
harryos wrote: hi I am trying to write a program to read data from a site url. The program must read the data from site every 5 minutes. def get_data_from_site(pageurlstr): h=urllib.urlopen(pageurlstr) data=h.read() process_data(data) At first, I thought of using the sched module

Re: sequence multiplied by -1

2010-09-29 Thread Lawrence D'Oliveiro
In message slrni9u4kv.28r0.usenet-nos...@guild.seebs.net, Seebs wrote: Helps, perhaps, that I got exposed to group theory early enough to be used to redefining + and * to be any two operations which have interesting properties ... But groups only have one such operation; it’s rings and fields

Re: scheduler or infinite loop

2010-09-29 Thread harryos
thanks Frank Here is a technique that allows the loop to run in the background, in its own thread, leaving the main program to do other processing - import threading class DataGetter(threading.Thread): -- http://mail.python.org/mailman/listinfo/python-list

Re: Introducing Kids to Programming: 2 or 3?

2010-09-29 Thread Emeka
Marco, This is a great news coming out of Africa. I would very much like to see this your success story replicate across the continent. I would like to participate and to have your programs for my country, Nigeria. From what you asked for, I would say that those kids should be part of the

PyCObject malloc creating memory leak

2010-09-29 Thread Tom Conneely
I'm attempting to write a library for reading data via USB from a device and processing the data to display graphs. I have already implemented parts of this code as pure python, as a proof of concept but I have now moved on to implementing the functions in a C extension. My original plan was to

Supplementing the std lib (Was: partial sums problem)

2010-09-29 Thread kj
In mailman.1142.1285722789.29448.python-l...@python.org Terry Reedy tjre...@udel.edu writes: Do not try to do a reduction with a comprehension. Just write clear, straightforward code that obviously works. s=[1,2,3,4,5,6] def cusum(s): t = 0 for i in s: t += i yield t

Re: System idle time under Linux

2010-09-29 Thread Hugo Léveillé
Thanks, will take a closer look on that But to get me started, how would you get, via python, the info from that ? Thanks alot On Thu, 30 Sep 2010 02:01 +1300, Lawrence D'Oliveiro l...@geek-central.gen.new wrote: /proc/stat or /proc/uptime, depending. See the proc(5) man page. --

Re: Reoedering indexes in list of list

2010-09-29 Thread Andreas Waldenburger
On Tue, 28 Sep 2010 11:55:18 -0700 (PDT) Toto emays...@gmail.com wrote: Hello, I have a list of list assume myList[x][y] is integer I would like to create an alias to that list which I could call this way: alias[y][x] returns myList[x][y] how can I do that ? (python 2.6) (I have a

Re: Strong typing vs. strong testing

2010-09-29 Thread Keith Thompson
Erik Max Francis m...@alcyone.com writes: Keith Thompson wrote: Erik Max Francis m...@alcyone.com writes: [...] print c # floating point accuracy aside 299792458.0 m/s Actually, the speed of light is exactly 299792458.0 m/s by definition. (The meter and the second are defined in terms

Re: toy list processing problem: collect similar terms

2010-09-29 Thread w_a_x_man
On Sep 26, 9:24 am, p...@informatimago.com (Pascal J. Bourguignon) wrote: Xah Lee xah...@gmail.com writes: here's a interesting toy list processing problem. I have a list of lists, where each sublist is labelled by a number. I need to collect together the contents of all sublists sharing

embedding python in macOS 10.6

2010-09-29 Thread tinau...@libero.it
hi there, i'm trying to embed python in a c++ code.i'm starting with the example in the tutorial.i've problem with setting up the enveiroment. I've installed python with the distributed version (i.e., i did not, as a start, build it myself); i added the library where both python.h and pyconfig

Python becoming orphaned over ssh

2010-09-29 Thread David
Hi there, I have a strange situation. If I do this: 1. Make a script /tmp/test.py on a remote server, with this contents: #!/usr/bin/python from subprocess import check_call check_call(['ping', 'www.google.com']) 2. Call the script like this over SSH: ssh r...@testbox /tmp/test.py 3.

R: embedding python in macOS 10.6

2010-09-29 Thread tinau...@libero.it
sorry, my error; in order to achieve what written before, i had to link to the libpython2.6.a that i find downloading the surce code. instead, if I link to the one of the distributed version, i get the following error: missing required architecture x86_64 in file. i tried to build with the -m32

Re: Re: Re: Upload files with wsgi

2010-09-29 Thread hidura
That is what i get: FieldStorage(None, None, []) On Sep 29, 2010 8:39am, hid...@gmail.com wrote: Python3k give me an error doing that. On Sep 29, 2010 3:55am, Richard Thomas chards...@gmail.com wrote: On Sep 28, 11:31 pm, Hidura hid...@gmail.com wrote: Hello, i have a project on

Re: System idle time under Linux

2010-09-29 Thread Grant Edwards
On 2010-09-29, Hugo L?veill? hu...@fastmail.net wrote: Thanks, will take a closer look on that But to get me started, how would you get, via python, the info from that? Good grief. They're text files. You open them, you read them, you parse the contents for the stuff you want. -- Grant

Re: System idle time under Linux

2010-09-29 Thread Thomas Jollans
On Wednesday 29 September 2010, it occurred to Hugo Léveillé to exclaim: Thanks, will take a closer look on that But to get me started, how would you get, via python, the info from that ? Parse the files. They may be very special files, but they are just files. Thanks alot On Thu,

Re: System idle time under Linux

2010-09-29 Thread Hugo Léveillé
Sorry, I am not a linux guy. Did not know it was a text file On Wed, 29 Sep 2010 14:48 +, Grant Edwards inva...@invalid.invalid wrote: On 2010-09-29, Hugo L?veill? hu...@fastmail.net wrote: Thanks, will take a closer look on that But to get me started, how would you get, via python,

Re: if the else short form

2010-09-29 Thread Philip Semanchuk
On Sep 29, 2010, at 7:19 AM, Tom Potts wrote: This is just a sneaky shorthand, which is fine if that's what you want, but it makes it harder to read. The reason it works is that 'fill==True' is a boolean expression, which evaluates to True or False, but if you force a True into being an

Re: System idle time under Linux

2010-09-29 Thread Grant Edwards
On 2010-09-29, Hugo L?veill? hu...@fastmail.net wrote: Sorry, I am not a linux guy. Did not know it was a text file And the file command (the usual way to figure that out) doesn't appear to be helpful: $ file /etc/passwd /etc/passwd: ASCII text [That's helpful] $ file /proc/stat

how to test get_special_folder_path()?

2010-09-29 Thread Philip Semanchuk
Hi all, The documentation for get_special_folder_path() and friends says that they're available as additional built-in functions in the installation script. http://docs.python.org/distutils/builtdist.html#the-postinstallation-script Does anyone know of a way to play around with these functions

Re: if the else short form

2010-09-29 Thread Emile van Sebille
On 9/29/2010 5:53 AM Philip Semanchuk said... Does Python make any guarantee that int(True) == 1 and int(False) == 0 will always hold, or are their values an implementation detail? I had exactly this same question occur to me yesterday, and yes, I believe it does. From

Re: if the else short form

2010-09-29 Thread Andreas Waldenburger
On Wed, 29 Sep 2010 08:53:17 -0400 Philip Semanchuk phi...@semanchuk.com wrote: Does Python make any guarantee that int(True) == 1 and int(False) == 0 will always hold, or are their values an implementation detail?

Re: bzr 2.2.1 released !

2010-09-29 Thread Sridhar Ratnakumar
Hi, It seems that you forgot to update PyPI - which lists 2.1.0rc1 as the latest version. -srid On 2010-09-28, at 7:20 AM, Vincent Ladeuil wrote: The Bazaar team is happy to announce availability of a new release of the bzr adaptive version control system. Bazaar is part of the GNU system

Re: Python becoming orphaned over ssh

2010-09-29 Thread John Nagle
On 9/29/2010 7:24 AM, David wrote: Hi there, I have a strange situation. If I do this: 1. Make a script /tmp/test.py on a remote server, with this contents: #!/usr/bin/python from subprocess import check_call Python's signal handling for multithread and multiprocess programs leaves

Determine sockets in use by python

2010-09-29 Thread Jim Mellander
Hi: I'm a newbie to python, although not to programming. Briefly, I am using a binding to an external library used for communication in a client-server context, with the server in python. Typically, I would set this up with event callbacks, and then enter a select loop, which, most the time

Re: Supplementing the std lib (Was: partial sums problem)

2010-09-29 Thread Ethan Furman
kj wrote: I'm interested in reading people's take on the question and their way of dealing with those functions they consider worthy of the standard library.) Well, I have no functions than I'm lobbying to get into the stdlib, but for all those handy-dandy utility functions, decorators, and

Re: if the else short form

2010-09-29 Thread Seebs
On 2010-09-29, Tracubik affdfsdfds...@b.com wrote: Hi all, I'm studying PyGTK tutorial and i've found this strange form: button = gtk.Button((False,, True,)[fill==True]) the label of button is True if fill==True, is False otherwise. i have googled for this form but i haven't found nothing,

Re: sequence multiplied by -1

2010-09-29 Thread Seebs
On 2010-09-29, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message slrni9u4kv.28r0.usenet-nos...@guild.seebs.net, Seebs wrote: Helps, perhaps, that I got exposed to group theory early enough to be used to redefining + and * to be any two operations which have interesting

Re: System idle time under Linux

2010-09-29 Thread Seebs
On 2010-09-29, Hugo L?veill? hu...@fastmail.net wrote: I have found it for windows and mac, but no luck under linux. Any idea? I don't think it's semantically well-defined. What makes a system idle? Is the machine in my basement idle? I don't think anyone's touched the keyboard in a week, but

Re: Strong typing vs. strong testing

2010-09-29 Thread Thomas A. Russ
George Neuner gneun...@comcast.net writes: On Tue, 28 Sep 2010 12:15:07 -0700, Keith Thompson ks...@mib.org wrote: He didn't say it was. Internal calculations are done in SI units (in this case, m^3/sec); on output, the internal units can be converted to whatever is convenient. That's

Re: (and scheme lisp) x Python and modern langs [was Re: gossip, Guy Steel, Lojban, Racket]

2010-09-29 Thread namekuseijin
On 28 set, 19:38, Xah Lee xah...@gmail.com wrote: • “list comprehension” is a very bad jargon; thus harmful to functional programing or programing in general. Being a bad jargon, it encourage mis-communication, mis-understanding. I disagree: it is a quite intuitive term to describe what the

Re: Determine sockets in use by python

2010-09-29 Thread Gary Herron
On 09/29/2010 09:50 AM, Jim Mellander wrote: Hi: I'm a newbie to python, although not to programming. Briefly, I am using a binding to an external library used for communication in a client-server context, with the server in python. Typically, I would set this up with event callbacks, and

Re: Strong typing vs. strong testing

2010-09-29 Thread MRAB
On 29/09/2010 18:54, Thomas A. Russ wrote: George Neunergneun...@comcast.net writes: On Tue, 28 Sep 2010 12:15:07 -0700, Keith Thompsonks...@mib.org wrote: He didn't say it was. Internal calculations are done in SI units (in this case, m^3/sec); on output, the internal units can be

Re: Strong typing vs. strong testing

2010-09-29 Thread George Neuner
On Wed, 29 Sep 2010 12:40:58 +0200, p...@informatimago.com (Pascal J. Bourguignon) wrote: George Neuner gneun...@comcast.net writes: On Tue, 28 Sep 2010 12:15:07 -0700, Keith Thompson ks...@mib.org wrote: George Neuner gneun...@comcast.net writes: On 28 Sep 2010 12:42:40 GMT, Albert van der

Re: utf-8 and ctypes

2010-09-29 Thread Brendan Miller
2010/9/29 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand: In message mailman.1132.1285714474.29448.python-l...@python.org, Brendan Miller wrote: It seems that characters not in the ascii subset of UTF-8 are discarded by c_char_p during the conversion ... Not a chance. ... or at

Re: System idle time under Linux

2010-09-29 Thread Hugo Léveillé
Good point One I am looking for, is time since last user mouse or keyboard action. So I guess I am looking for the exact same thing a screensaver is looking for On Wed, 29 Sep 2010 17:27 +, Seebs usenet-nos...@seebs.net wrote: On 2010-09-29, Hugo L?veill? hu...@fastmail.net wrote: I

Re: About __class__ of an int literal

2010-09-29 Thread Terry Reedy
On 9/29/2010 8:34 AM, Hrvoje Niksic wrote: Steven D'Apranost...@remove-this-cybersource.com.au writes: On Wed, 29 Sep 2010 02:20:55 +0100, MRAB wrote: On 29/09/2010 01:19, Terry Reedy wrote: A person using instances of a class should seldom use special names directly. They are, in a

Re: System idle time under Linux

2010-09-29 Thread Seebs
On 2010-09-29, Hugo L?veill? hu...@fastmail.net wrote: One I am looking for, is time since last user mouse or keyboard action. So I guess I am looking for the exact same thing a screensaver is looking for You can probably get it from X somehow, but... Basically, be aware that it is entirely

Re: System idle time under Linux

2010-09-29 Thread Grant Edwards
On 2010-09-29, Hugo L?veill? hu...@fastmail.net wrote: One I am looking for, is time since last user mouse or keyboard action. So I guess I am looking for the exact same thing a screensaver is looking for Oh. That's not what idle generally means in a Unix/Linux context, so you can disregard

Re: Strong typing vs. strong testing

2010-09-29 Thread Squeamizh
On Sep 27, 10:46 am, namekuseijin namekusei...@gmail.com wrote: On 27 set, 05:46, TheFlyingDutchman zzbba...@aol.com wrote: On Sep 27, 12:58 am, p...@informatimago.com (Pascal J. Bourguignon) wrote: RG rnospa...@flownet.com writes: In article

Re: Determine sockets in use by python

2010-09-29 Thread Jim Mellander
Hi Gary: Certainly not windows I'm developing on OS/X but for production probably Linux and FreeBSD (I'm hoping for something a bit more portable than running 'lsof' and parsing the output, but appreciate any/all advice) On Wed, Sep 29, 2010 at 11:05 AM, Gary Herron gher...@digipen.edu

Re: File holes in Linux

2010-09-29 Thread Ned Deily
In article aanlktinpuyzl5laqbv-b3bux6ozyd6+umpxrptqh7...@mail.gmail.com, Tom Potts karake...@gmail.com wrote: Hi, all. I'm not sure if this is a bug report, a feature request or what, so I'm posting it here first to see what people make of it. I was copying over a large number of files

Re: Certificate validation with HTTPSConnection

2010-09-29 Thread Ned Deily
In article d07279e14b9bbb842bf97b8874f7d...@ivanov-nest.com, Velko Ivanov viva...@ivanov-nest.com wrote: I've always wandered why HTTPSConnection does not validate certificates? It is fairly simple to use the SSL socket's validation: [...] Perhaps you can write up your example as a

Re: File holes in Linux

2010-09-29 Thread Christian Heimes
Am 29.09.2010 11:05, schrieb Tom Potts: A quick `ls -sl filehole.test' will show that the created file actually takes up about 980k, rather than the 0 bytes expected. If anyone can let me know if this is indeed a bug or feature request, how to get around it, or where to take it next, I'd

Re: File holes in Linux

2010-09-29 Thread Grant Edwards
On 2010-09-29, Ned Deily n...@acm.org wrote: aanlktinpuyzl5laqbv-b3bux6ozyd6+umpxrptqh7...@mail.gmail.com, Tom Potts karake...@gmail.com wrote: Hi, all. I'm not sure if this is a bug report, a feature request or what, so I'm posting it here first to see what people make of it. I was copying

Re: Certificate validation with HTTPSConnection

2010-09-29 Thread John Nagle
On 9/29/2010 1:18 PM, Ned Deily wrote: In articled07279e14b9bbb842bf97b8874f7d...@ivanov-nest.com, Velko Ivanovviva...@ivanov-nest.com wrote: I've always wandered why HTTPSConnection does not validate certificates? It is fairly simple to use the SSL socket's validation: [...] Perhaps you

Re: (and scheme lisp) x Python and modern langs [was Re: gossip, Guy Steel, Lojban, Racket]

2010-09-29 Thread Xah Lee
On Sep 29, 11:02 am, namekuseijin namekusei...@gmail.com wrote: On 28 set, 19:38, Xah Lee xah...@gmail.com wrote: • “list comprehension” is a very bad jargon; thus harmful to functional programing or programing in general. Being a bad jargon, it encourage mis-communication,

Re: (and scheme lisp) x Python and modern langs [was Re: gossip, Guy Steel, Lojban, Racket]

2010-09-29 Thread Ian Kelly
On Wed, Sep 29, 2010 at 2:46 PM, Xah Lee xah...@gmail.com wrote: what's your basis in saying that “list comprehension” is intuitive? any statics, survery, research, references you have to cite? to put this in context, are you saying that lambda, is also intuitive? “let” is intuitive? “for”

Re: list problem...

2010-09-29 Thread Rog
On Wed, 29 Sep 2010 05:52:32 -0700, bruno.desthuilli...@gmail.com wrote: On 29 sep, 14:17, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Tue, 28 Sep 2010 20:11:51 +0100, Rog wrote: On Tue, 28 Sep 2010 11:59:08 -0700, geremy condra wrote: On Tue, Sep 28, 2010 at 11:44 AM,

Re: Strong typing vs. strong testing

2010-09-29 Thread RG
In article 996bd4e6-37ff-4a55-8db5-6e7574fbd...@k22g2000prb.googlegroups.com, Squeamizh sque...@hotmail.com wrote: On Sep 27, 10:46 am, namekuseijin namekusei...@gmail.com wrote: On 27 set, 05:46, TheFlyingDutchman zzbba...@aol.com wrote: On Sep 27, 12:58 am,

Re: Example or recomendation of a webserver

2010-09-29 Thread Hidura
I use Python3.1, TurboGears, webOb, CherryPy and the others don' t work on Python 3, please somebody recomend me a web framework for Python3.1 I AM DESPERATE On Wed, Sep 29, 2010 at 6:08 PM, Hidura hid...@gmail.com wrote: I use Python3.1, TurboGears, webOb, CherryPy and the others don' t work

Re: Strong typing vs. strong testing

2010-09-29 Thread Squeamizh
On Sep 29, 3:02 pm, RG rnospa...@flownet.com wrote: In article 996bd4e6-37ff-4a55-8db5-6e7574fbd...@k22g2000prb.googlegroups.com,  Squeamizh sque...@hotmail.com wrote: On Sep 27, 10:46 am, namekuseijin namekusei...@gmail.com wrote: On 27 set, 05:46, TheFlyingDutchman zzbba...@aol.com

Re: Strong typing vs. strong testing

2010-09-29 Thread RG
In article 07f75df3-778d-4e3d-8aa0-fbd4bd108...@k22g2000prb.googlegroups.com, Squeamizh sque...@hotmail.com wrote: On Sep 29, 3:02 pm, RG rnospa...@flownet.com wrote: In article 996bd4e6-37ff-4a55-8db5-6e7574fbd...@k22g2000prb.googlegroups.com,  Squeamizh sque...@hotmail.com

Re: Certificate validation with HTTPSConnection

2010-09-29 Thread Ned Deily
In article 4ca3a46b.4080...@animats.com, John Nagle na...@animats.com wrote: We've been through this. Too many times. http://bugs.python.org/issue1114345 (2005: Broken in Python 2.2, eventually fixed) http://www.justinsamuel.com/2008/12/25/the-importance-of-validating-ssl-certif

Re: utf-8 and ctypes

2010-09-29 Thread MRAB
On 29/09/2010 19:33, Brendan Miller wrote: 2010/9/29 Lawrence D'Oliveirol...@geek-central.gen.new_zealand: In messagemailman.1132.1285714474.29448.python-l...@python.org, Brendan Miller wrote: It seems that characters not in the ascii subset of UTF-8 are discarded by c_char_p during the

Re: PyCObject malloc creating memory leak

2010-09-29 Thread Antoine Pitrou
On Wed, 29 Sep 2010 06:50:05 -0700 (PDT) Tom Conneely tom.conne...@gmail.com wrote: My original plan was to have the data processing and data acquisition functions running in separate processes, with a multiprocessing.Queue for passing the raw data packets. The raw data is read in as a char*,

Re: Certificate validation with HTTPSConnection

2010-09-29 Thread Antoine Pitrou
On Wed, 29 Sep 2010 13:41:15 -0700 John Nagle na...@animats.com wrote: The really stupid thing about the current SSL module is that it accepts a file of root certificates as a parameter, but ignores it. That's not true. You have to pass CERT_OPTIONAL or CERT_REQUIRED as a parameter (CERT_NONE

Re: Strong typing vs. strong testing

2010-09-29 Thread Keith Thompson
RG rnospa...@flownet.com writes: In article 07f75df3-778d-4e3d-8aa0-fbd4bd108...@k22g2000prb.googlegroups.com, Squeamizh sque...@hotmail.com wrote: On Sep 29, 3:02 pm, RG rnospa...@flownet.com wrote: [...] This is a red herring.  You don't have to invoke run-time input to demonstrate

Re: Strong typing vs. strong testing

2010-09-29 Thread Pascal J. Bourguignon
Squeamizh sque...@hotmail.com writes: In short, static typing doesn't solve all conceivable problems. We are all aware that there is no perfect software development process or tool set. I'm interested in minimizing the number of problems I run into during development, and the number of bugs

Re: Strong typing vs. strong testing

2010-09-29 Thread RG
In article lnk4m45eu0@nuthaus.mib.org, Keith Thompson ks...@mib.org wrote: RG rnospa...@flownet.com writes: In article 07f75df3-778d-4e3d-8aa0-fbd4bd108...@k22g2000prb.googlegroups.com, Squeamizh sque...@hotmail.com wrote: On Sep 29, 3:02 pm, RG rnospa...@flownet.com wrote: [...]

Re: Strong typing vs. strong testing

2010-09-29 Thread Thomas A. Russ
RG rnospa...@flownet.com writes: More power to you. What are you doing here on cll then? This thread is massively cross-posted. -- Thomas A. Russ, USC/Information Sciences Institute -- http://mail.python.org/mailman/listinfo/python-list

Re: Strong typing vs. strong testing

2010-09-29 Thread Keith Thompson
RG rnospa...@flownet.com writes: In article lnk4m45eu0@nuthaus.mib.org, Keith Thompson ks...@mib.org wrote: RG rnospa...@flownet.com writes: In article 07f75df3-778d-4e3d-8aa0-fbd4bd108...@k22g2000prb.googlegroups.com, Squeamizh sque...@hotmail.com wrote: On Sep 29, 3:02 pm, RG

Re: list problem...

2010-09-29 Thread Shashwat Anand
On Thu, Sep 30, 2010 at 3:20 AM, Rog r...@pynguins.com wrote: On Wed, 29 Sep 2010 05:52:32 -0700, bruno.desthuilli...@gmail.com wrote: On 29 sep, 14:17, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Tue, 28 Sep 2010 20:11:51 +0100, Rog wrote: On Tue, 28 Sep 2010

Re: About __class__ of an int literal

2010-09-29 Thread Steven D'Aprano
On Wed, 29 Sep 2010 14:46:18 -0400, Terry Reedy wrote: In that sense the user should be calling iter(foo) instead of foo.__iter__(), next(foo) instead of foo.__next__(), and foo+bar instead of foo.__add__(bar). Yes. Guido added iter() and next() to the list of built-in functions, even

Re: Strong typing vs. strong testing

2010-09-29 Thread Squeamizh
On Sep 29, 3:14 pm, RG rnospa...@flownet.com wrote: In article 07f75df3-778d-4e3d-8aa0-fbd4bd108...@k22g2000prb.googlegroups.com,  Squeamizh sque...@hotmail.com wrote: On Sep 29, 3:02 pm, RG rnospa...@flownet.com wrote: In article

ANNOUNCING Tahoe, the Least-Authority File System, v1.8.0

2010-09-29 Thread Zooko O'Whielacronx
Hello, people of python-list. This storage project uses Python for almost everything, except we use C/C++ for the CPU-intensive computations (cryptography and erasure coding) and we use JavaScript for some user interface bits. We're even looking at the possibility of replacing the C/C++ crypto

Re: Strong typing vs. strong testing

2010-09-29 Thread RG
In article lnfwws5b5t@nuthaus.mib.org, Keith Thompson ks...@mib.org wrote: RG rnospa...@flownet.com writes: In article lnk4m45eu0@nuthaus.mib.org, Keith Thompson ks...@mib.org wrote: RG rnospa...@flownet.com writes: In article

Re: Supplementing the std lib (Was: partial sums problem)

2010-09-29 Thread Paul Rubin
kj no.em...@please.post writes: But in the immediate term, cusum is not part of the standard library. Where would you put it if you wanted to reuse it? Do you create a module just for it? Or do you create a general stdlib2 module with all those workhorse functions that have not made it to

Re: About __class__ of an int literal

2010-09-29 Thread Steven D'Aprano
On Wed, 29 Sep 2010 14:34:33 +0200, Hrvoje Niksic wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: (This may change in the future. Given type(), and isinstance(), I'm not sure what value __class__ adds.) None whatsoever. __class__ used to be necessary to tell the appart

Re: Strong typing vs. strong testing

2010-09-29 Thread Seebs
On 2010-09-30, RG rnospa...@flownet.com wrote: That the problem is elsewhere in the program ought to be small comfort. It is, perhaps, but it's also an important technical point: You CAN write correct code for such a thing. int maximum(int a, int b) { return a b ? a : b; } int main() {

Re: Strong typing vs. strong testing

2010-09-29 Thread Keith Thompson
RG rnospa...@flownet.com writes: [...] That the problem is elsewhere in the program ought to be small comfort. I don't claim that it's comforting, merely that it's true. But very well, try this instead: [...@mighty:~]$ cat foo.c #include stdio.h int maximum(int a, int b) {

  1   2   3   4   >