ANN: sysv_ipc 0.6 now available

2010-05-21 Thread Philip Semanchuk
sysv_ipc 0.6 is now available. This is the first version to include Python 3 support. sysv_ipc is a BSD-licensed module which gives Python access to System V inter-process semaphores, shared memory and message queues on most (all?) *nix flavors, and possibly Windows + Cygwin.

[ANN] oStri: Cython optimized String object

2010-05-21 Thread Mike 'Fuzzy' Partin
Optimized String-like Object is kind of a misnomer in that, the object provided is a subclass of the base str type, adding optimized (Cython bindings to the standard (POSIX) libc regex and string functions) match() and sub() methods. Homepage: https://wiki.fu-manchu.org/doku.php?id=projects:ostri

Just a little over a week left for Early bird registration for PyCon Ireland

2010-05-21 Thread Vicky Twomey-Lee
Hi All, Early bird registration (€40) for PyCon Ireland 2010 ends 31st May. It'll revert to standard price of €60. (As well as Sat and Sun's days events, a conference pass incls. a dinner and live entertainment on Saturday night). Bringing a friend, partner, etc. for dinner on Sat evening? You

Help with PyQt4 tabwidget setup

2010-05-21 Thread dpalmboom
I am creating an application and I'm busy designing the main layout on the main window. What I would like to do is the following: Create a QTabWidget with a QVBoxLayout already inside it and also a scrollbar inside it. When a user triggers a menu item, a QDockWidget must be created and inserted

socket.getsockopt() and SO_ORIGINAL_DST

2010-05-21 Thread chris
Hi guys, On netfilter-based NAT systems there is theoretically a possibility to retrieve the original address *after* NAT'ing a connection. In C, this can be done as in squid, a transparent HTTP proxy: http://paste.pocoo.org/show/216495/ I'd like to do the same in Python. So I started with a

Solutions for finding the 1000th prime

2010-05-21 Thread Neal
I'm doing the MIT OpenCourseWare class that this assignment hails from and I don't doubt that its a relatively common assignment. Upon searching for it for some ideas of why my program wouldn't work one of the top results is this a thread from this group full of derision and sarcasm. Believe me I

Re: optional argument to a subclass of a class

2010-05-21 Thread Steven D'Aprano
On Thu, 20 May 2010 23:35:01 -0400, Alex Hall wrote: You overrode the __init__method from the superclass. I know, I thought I had to in order to make all of Craft's attribs available to the Battleship. Is that not the case? No, the opposite in fact. One of the basic features of objects (at

Re: optional argument to a subclass of a class

2010-05-21 Thread Peter Otten
Alex Hall wrote: Hi all, I am now trying to allow my classes, all of which subclass a single class (if that is the term), to provide optional arguments. Here is some of my code: class Craft(): def __init__(self, name, isAircraft=False, id=helpers.id(), hits=0, weapons=[]):

Re: socket.getsockopt() and SO_ORIGINAL_DST

2010-05-21 Thread chris
Hi guys, I found a solution myself in O'Reilly's Security Power Tools. It works seamlessly as follows: from socket import * SO_ORIGINAL_DST = 80 s = socket(AF_INET, SOCK_STREAM) s.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) s.bind(('192.168.255.254', 80)) s.listen(1) conn, addr = s.accept() dst =

Re: Solutions for finding the 1000th prime

2010-05-21 Thread Peter Otten
Neal wrote: I'm doing the MIT OpenCourseWare class that this assignment hails from and I don't doubt that its a relatively common assignment. Upon searching for it for some ideas of why my program wouldn't work one of the top results is this a thread from this group full of derision and

Re: intervall of about 1 second for xmlrpc calls?

2010-05-21 Thread rav
I had similar problem with SimpleXMLRPCServer Create the request handler class class ExtendedXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): # originally this one was slowing down my server A LOT due to DNS settings!!! def log_request(self, *args): pass and put it in your

Re: CGI python 3 write RAW BINARY

2010-05-21 Thread sam
On May 7, 7:33 am, Dodo dodo_do_not_wake...@yahoo.fr wrote: Le 01/05/2010 12:52, Dodo a écrit : Le 30/04/2010 17:52, Antoine Pitrou a écrit : Le Thu, 29 Apr 2010 23:37:32 +0200, Dodo a écrit : I don't get a thing. Now with the fix : All browsers shows a different thing, but not

Re: client server console app with cmd library

2010-05-21 Thread kak...@gmail.com
On May 20, 1:54 am, kak...@gmail.com kak...@gmail.com wrote: Hi to all, i need some hints about a console application i' m trying. I want to make it act as a client and as a server at a same time. And since it is a console application i' m using cmd library. I want something that works like

where are the program that are written in python?

2010-05-21 Thread Deep_Feelings
python is not a new programming language ,it has been there for the last 15+ years or so ? right ? however by having a look at this page http://wiki.python.org/moin/Applications i could not see many programs written in python (i will be interested more in COMMERCIAL programs written in

Re: where are the program that are written in python?

2010-05-21 Thread Simon Brunning
On 21 May 2010 11:21:11 UTC+1, Deep_Feelings doctore...@gmail.com wrote: 1- where are the programs that is written in python ? 2- python is high productivity language : why there are no commercial programs written in python ? See http://www.python.org/about/success/ -- Cheers, Simon B. --

Re: where are the program that are written in python?

2010-05-21 Thread Martin P. Hellwig
On 05/21/10 11:21, Deep_Feelings wrote: python is not a new programming language ,it has been there for the last 15+ years or so ? right ? Yeah about the same as Java however by having a look at this page http://wiki.python.org/moin/Applications i could not see many programs written in

Re: where are the program that are written in python?

2010-05-21 Thread Jake b
did this not go to the list? Arg, reply does in other mailing list. On Fri, May 21, 2010 at 5:48 AM, Jake b ninmonk...@gmail.com wrote: I took it as game-domain only question: I don't know of any big game written in python. ( meaning python code, using c++ libs. ) Verses games that at their

Re: client server console app with cmd library

2010-05-21 Thread Jake b
Networking can be hard. I'd suggest checking out these libs. pygame mastermind: http://www.pygame.org/project-Mastermind+Networking+Lib-859-1773.html podSixNet : http://mccormick.cx/projects/PodSixNet/ twisted: http://wiki.python.org/moin/Twisted-Examples lots of references in the answers to

Re: [ANN] oStri: Cython optimized String object

2010-05-21 Thread Stefan Behnel
Mike 'Fuzzy' Partin, 21.05.2010 08:37: Optimized String-like Object is kind of a misnomer in that, the object provided is a subclass of the base str type, adding optimized (Cython bindings to the standard (POSIX) libc regex and string functions) match() and sub() methods. Hi, could you give

Re: where are the program that are written in python?

2010-05-21 Thread Deep_Feelings
On May 21, 1:35 pm, Simon Brunning si...@brunningonline.net wrote: On 21 May 2010 11:21:11 UTC+1, Deep_Feelings doctore...@gmail.com wrote: Seehttp://www.python.org/about/success/ thankx for reply. from that list i have a feeling that python is acting only as quick and dirty work nothing more

Re: where are the program that are written in python?

2010-05-21 Thread News123
Deep_Feelings wrote: On May 21, 1:35 pm, Simon Brunning si...@brunningonline.net wrote: On 21 May 2010 11:21:11 UTC+1, Deep_Feelings doctore...@gmail.com wrote: Seehttp://www.python.org/about/success/ thankx for reply. from that list i have a feeling that python is acting only as quick

unique values of a Dictionary list (removing duplicate elements of a list)

2010-05-21 Thread Chad Kellerman
Python users, I am parsing an AIX trace file and creating a dictionary containing keys (PIDS) and values (a list of TIDS). With PIDS being unique process ids and TIDS, being a list of thread ids. My function populates the keys so that they are unique, but my list contains duplicates.

Re: where are the program that are written in python?

2010-05-21 Thread Xavier Ho
On Fri, May 21, 2010 at 9:12 PM, Deep_Feelings doctore...@gmail.com wrote: thankx for reply. from that list i have a feeling that python is acting only as quick and dirty work nothing more ! You might have just offended a lot of people on the list here Cheers, Xav --

Re: where are the program that are written in python?

2010-05-21 Thread Simon Brunning
On 21 May 2010 12:12:18 UTC+1, Deep_Feelings doctore...@gmail.com wrote: from that list i have a feeling that python is acting only as quick and dirty work nothing more ! Really? Well, in any case, I can tell you that I know of a number of large commercial web sites built with Django. I just

Re: where are the program that are written in python?

2010-05-21 Thread Wolfgang Rohdewald
On Freitag 21 Mai 2010, Jake b wrote: I don't know of any big game written in python. ( meaning python code, using c++ libs would you call 8702 python statements big? If so, Kajongg would be a candidate. -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: unique values of a Dictionary list (removing duplicate elements of a list)

2010-05-21 Thread Peter Otten
Chad Kellerman wrote: Python users, I am parsing an AIX trace file and creating a dictionary containing keys (PIDS) and values (a list of TIDS). With PIDS being unique process ids and TIDS, being a list of thread ids. My function populates the keys so that they are unique, but my

Re: unique values of a Dictionary list (removing duplicate elements of a list)

2010-05-21 Thread Chad Kellerman
On Fri, May 21, 2010 at 7:50 AM, Peter Otten __pete...@web.de wrote: Chad Kellerman wrote: Python users, I am parsing an AIX trace file and creating a dictionary containing keys (PIDS) and values (a list of TIDS). With PIDS being unique process ids and TIDS, being a list of

Re: optional argument to a subclass of a class

2010-05-21 Thread Alex Hall
On 5/21/10, Peter Otten __pete...@web.de wrote: Alex Hall wrote: Hi all, I am now trying to allow my classes, all of which subclass a single class (if that is the term), to provide optional arguments. Here is some of my code: class Craft(): def __init__(self, name, isAircraft=False,

Re: intervall of about 1 second for xmlrpc calls?

2010-05-21 Thread Adam Tauno Williams
On Fri, 2010-05-21 at 02:10 -0700, rav wrote: I had similar problem with SimpleXMLRPCServer Create the request handler class class ExtendedXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): # originally this one was slowing down my server A LOT due to DNS settings!!! def

Re: where are the program that are written in python?

2010-05-21 Thread Adam Tauno Williams
On Fri, 2010-05-21 at 11:37 +0100, Martin P. Hellwig wrote: On 05/21/10 11:21, Deep_Feelings wrote: however by having a look at this page http://wiki.python.org/moin/Applications i could not see many programs written in python (i will be interested more in COMMERCIAL programs written in

Re: Reading data from a Microsoft Access 2003 database

2010-05-21 Thread Adam Tauno Williams
On Thu, 2010-05-20 at 22:58 -0700, Dennis Lee Bieber wrote: On Thu, 20 May 2010 02:45:10 -0700 (PDT), Jimoid jimmy.cul...@gmail.com declaimed the following in gmane.comp.python.general: I've now had a closer look at both pyODBC and mxODBC and it seems to me that they both require the

Re: unique values of a Dictionary list (removing duplicate elements of a list)

2010-05-21 Thread Chad Kellerman
On Fri, May 21, 2010 at 8:07 AM, Chad Kellerman sunck...@gmail.com wrote: On Fri, May 21, 2010 at 7:50 AM, Peter Otten __pete...@web.de wrote: Chad Kellerman wrote: Python users, I am parsing an AIX trace file and creating a dictionary containing keys (PIDS) and values (a list

Re: unique values of a Dictionary list (removing duplicate elements of a list)

2010-05-21 Thread Peter Otten
Chad Kellerman wrote: On Fri, May 21, 2010 at 8:07 AM, Chad Kellerman sunck...@gmail.com wrote: On Fri, May 21, 2010 at 7:50 AM, Peter Otten __pete...@web.de wrote: Chad Kellerman wrote: Python users, I am parsing an AIX trace file and creating a dictionary containing keys

Another Go is Python-like article.

2010-05-21 Thread Grant Edwards
In a recent Reg article, there's yet more yammering on about how Go is somehow akin to Python -- referring to Go as a Python-C++ crossbreed. http://www.theregister.co.uk/2010/05/20/go_in_production_at_google/ I still don't get it. What about Go, exactly, do people see as Phython-like? Go

Re: Another Go is Python-like article.

2010-05-21 Thread David Cournapeau
On Fri, May 21, 2010 at 11:20 PM, Grant Edwards inva...@invalid.invalid wrote: In a recent Reg article, there's yet more yammering on about how Go is somehow akin to Python -- referring to Go as a Python-C++ crossbreed. http://www.theregister.co.uk/2010/05/20/go_in_production_at_google/ I

Re: function that counts...

2010-05-21 Thread Albert van der Horst
In article ht4406$92...@reader1.panix.com, Grant Edwards inva...@invalid.invalid wrote: Lest my allusions to Fortran IV be lost upon the less grizzled, only the first 6 characters were significant in Fortran IV identifiers, and removing all of the vowels from a longer word was an idiomatic way

creating addon system

2010-05-21 Thread timo verbeek
What is the easiest way in python to create a addon system? I found to easy ways: * using a import system like this: for striper in stripers: if striper[enabled]: exec(from strip import %s as _x%striper[striper]) string = _x.start(string) * using exec

Re: Problem with an huge dictionary

2010-05-21 Thread keobox
On 20 Mag, 12:58, Thomas Lehmann t.lehm...@rtsgroup.net wrote: The question is: Is there a limit on the number of entries a dictionary can have i jython? I wrote a little app where my data is stored in a huge dictionary (11746 entries) generated with a python script. When I try to

string.Template.safe_substitute() with % type formatting?

2010-05-21 Thread python
Python 2.6: Is there a programming technique or 3rd party formatting module that supports string.Template.safe_substitute() type string substituion with % type formatting rules for width, decimals, justification, etc? Or do I need to use a 3rd party template engine to get the best of both worlds?

Re: help need to write a python spell checker

2010-05-21 Thread Albert van der Horst
In article mailman.411.1274281806.32709.python-l...@python.org, Terry Reedy tjre...@udel.edu wrote: On 5/19/2010 3:17 AM, CM wrote: I love how he just copied and pasted the assignment without any other remarks. Yeah, that way he did not mess it up ;-). OTOH it may be a copyright infringement.

Re: where are the program that are written in python?

2010-05-21 Thread Jason Scheirer
On May 21, 3:21 am, Deep_Feelings doctore...@gmail.com wrote: python is not a new programming language ,it has been there for the last 15+ years or so ? right ? however by having a look at this pagehttp://wiki.python.org/moin/Applications i could not see many programs written in python

Re: Strange MySQL Problem

2010-05-21 Thread John Nagle
Christian Heimes wrote: MRAB wrote: I think you need to 'commit' any changes to do to the database. Yeah, you are right. Also some RDBMS don't support DDL and DML statements inside one transaction. You may need to commit and begin after the create table DDL. Christian Er, yes.

Another Strange MySQL Problem

2010-05-21 Thread Victor Subervi
Hi; When I try to execute this code from my Python script, I get this error: Traceback (most recent call last): File /var/www/html/creative.vi/clients/sea-flight/reservations/create_edit_bags3.py, line 38, in ? create_edit_bags3() File

Re: optional argument to a subclass of a class

2010-05-21 Thread Terry Reedy
On 5/20/2010 10:56 PM, Alex Hall wrote: A couple of style comments for you to consider. class Craft(): def __init__(self, name, isAircraft=False, id=helpers.id(), hits=0, weapons=[]): Not indenting lines after def makes the code harder to read for me, and, I expect, many others

Re: optional argument to a subclass of a class

2010-05-21 Thread Alex Hall
On 5/21/10, Terry Reedy tjre...@udel.edu wrote: On 5/20/2010 10:56 PM, Alex Hall wrote: A couple of style comments for you to consider. class Craft(): def __init__(self, name, isAircraft=False, id=helpers.id(), hits=0, weapons=[]): Not indenting lines after def makes the

Re: optional argument to a subclass of a class

2010-05-21 Thread Christian Heimes
Am 21.05.2010 04:56, schrieb Alex Hall: Hi all, I am now trying to allow my classes, all of which subclass a single class (if that is the term), to provide optional arguments. Here is some of my code: class Craft(): def __init__(self, name, isAircraft=False, id=helpers.id(), hits=0,

Re: Solutions for finding the 1000th prime

2010-05-21 Thread Neal
You did provide a very constructive answer and I do apologize for generalizing the group or all the posts. And while the original poster did not seem to have made much of an effort, the tone of the initial response of that thread turns off anyone else who may be willing to make that effort. I

Re: where are the program that are written in python?

2010-05-21 Thread Terry Reedy
On 5/21/2010 7:12 AM, Deep_Feelings wrote: On May 21, 1:35 pm, Simon Brunningsi...@brunningonline.net wrote: On 21 May 2010 11:21:11 UTC+1, Deep_Feelingsdoctore...@gmail.com wrote: Seehttp://www.python.org/about/success/ thankx for reply. from that list i have a feeling that python is

Re: where are the program that are written in python?

2010-05-21 Thread Patrick Maupin
On May 21, 5:21 am, Deep_Feelings doctore...@gmail.com wrote: i could not see many programs written in python Well you could try PyPi, or even a search on googlecode. (i will be interested more in COMMERCIAL programs written in python ). What do you mean by commercial, and why? and to be

Re: creating addon system

2010-05-21 Thread Krister Svanlund
On Fri, May 21, 2010 at 5:50 PM, timo verbeek timoverbee...@gmail.com wrote: What is the easiest way in python to create a addon system? I found to easy ways: * using a import system like this:       for striper in stripers:        if striper[enabled]:            exec(from strip import %s as

Re: optional argument to a subclass of a class

2010-05-21 Thread Alex Hall
On 5/21/10, Christian Heimes li...@cheimes.de wrote: Am 21.05.2010 04:56, schrieb Alex Hall: Hi all, I am now trying to allow my classes, all of which subclass a single class (if that is the term), to provide optional arguments. Here is some of my code: class Craft(): def __init__(self,

Re: where are the program that are written in python?

2010-05-21 Thread geremy condra
On Fri, May 21, 2010 at 4:12 AM, Deep_Feelings doctore...@gmail.com wrote: On May 21, 1:35 pm, Simon Brunning si...@brunningonline.net wrote: On 21 May 2010 11:21:11 UTC+1, Deep_Feelings doctore...@gmail.com wrote: Seehttp://www.python.org/about/success/ thankx for reply. from that list i

Re: Another Strange MySQL Problem

2010-05-21 Thread Tim Chase
On 05/21/2010 12:31 PM, Victor Subervi wrote: cursor.execute('insert into Baggage values (Null, %s, %s, %s, %s)', (flight_id, customer_id, weight, ticket_no)) You're trying to insert stuff... OperationalError: (1452, 'Cannot add or update a child row: a foreign key constraint fails

Re: where are the program that are written in python?

2010-05-21 Thread Terry Reedy
On 5/21/2010 6:21 AM, Deep_Feelings wrote: python is not a new programming language ,it has been there for the last 15+ years or so ? right ? however by having a look at this page http://wiki.python.org/moin/Applications i could not see many programs written in python (i will be interested

Re: optional argument to a subclass of a class

2010-05-21 Thread Chris Rebert
On Fri, May 21, 2010 at 11:38 AM, Alex Hall mehg...@gmail.com wrote: On 5/21/10, Christian Heimes li...@cheimes.de wrote: Am 21.05.2010 04:56, schrieb Alex Hall: Hi all, I am now trying to allow my classes, all of which subclass a single class (if that is the term), to provide optional

Re: optional argument to a subclass of a class

2010-05-21 Thread Peter Otten
Alex Hall wrote: On 5/21/10, Christian Heimes li...@cheimes.de wrote: Am 21.05.2010 04:56, schrieb Alex Hall: Hi all, I am now trying to allow my classes, all of which subclass a single class (if that is the term), to provide optional arguments. Here is some of my code: class Craft():

Re: where are the program that are written in python?

2010-05-21 Thread Tim Chase
On 05/21/2010 01:40 PM, geremy condra wrote: See http://www.python.org/about/success/ thankx for reply. from that list i have a feeling that python is acting only as quick and dirty work nothing more ! Yeah, there's not really a lot of industry support. If only we could get a huge search

Re: optional argument to a subclass of a class

2010-05-21 Thread Chris Rebert
On Fri, May 21, 2010 at 11:49 AM, Chris Rebert c...@rebertia.com wrote: On Fri, May 21, 2010 at 11:38 AM, Alex Hall mehg...@gmail.com wrote: On 5/21/10, Christian Heimes li...@cheimes.de wrote: Am 21.05.2010 04:56, schrieb Alex Hall: Hi all, I am now trying to allow my classes, all of which

Re: optional argument to a subclass of a class

2010-05-21 Thread Ethan Furman
Alex Hall wrote: On 5/20/10, alex23 wuwe...@gmail.com wrote: I have since updated each ship's __init__ to accept all the arguments that Craft accepts so that I can support all optional arguments, Ick. Now you'll have to change several things if you make one change to the Craft class.

Re: creating addon system

2010-05-21 Thread Adam Tauno Williams
On Fri, 2010-05-21 at 08:50 -0700, timo verbeek wrote: What is the easiest way in python to create a addon system? I found to easy ways: * using a import system like this: for striper in stripers: if striper[enabled]: exec(from strip import %s as

Re: optional argument to a subclass of a class

2010-05-21 Thread Alex Hall
On 5/21/10, Ethan Furman et...@stoneleaf.us wrote: Alex Hall wrote: On 5/20/10, alex23 wuwe...@gmail.com wrote: I have since updated each ship's __init__ to accept all the arguments that Craft accepts so that I can support all optional arguments, Ick. Now you'll have to change several

Re: optional argument to a subclass of a class

2010-05-21 Thread Chris Rebert
On Fri, May 21, 2010 at 1:09 PM, Alex Hall mehg...@gmail.com wrote: On 5/21/10, Ethan Furman et...@stoneleaf.us wrote: Alex Hall wrote: On 5/20/10, alex23 wuwe...@gmail.com wrote: I have since updated each ship's __init__ to accept all the arguments that Craft accepts so that I can support

First Tkinter script: requesting comments

2010-05-21 Thread Bart Kastermans
I wrote a first script using Tkinter. As I am new to its use, I am only just feeling my way around. I would very much like comments on the design of the script (and in fact any other comments on my code would also be very welcome). I have it posted (with syntax coloring) at:

gettext compatible, public domain collections of translations for strings commonly used in software applications?

2010-05-21 Thread python
It seems to me that there must be some public domain collection of translated strings that could be searched for 1:1 or fuzzy translations for strings commonly used in software applications? Is there a technical and copyright friendly (LGPL licensed?) way to query services like Google's

Re: optional argument to a subclass of a class

2010-05-21 Thread Alex Hall
On 5/21/10, Chris Rebert c...@rebertia.com wrote: On Fri, May 21, 2010 at 1:09 PM, Alex Hall mehg...@gmail.com wrote: On 5/21/10, Ethan Furman et...@stoneleaf.us wrote: Alex Hall wrote: On 5/20/10, alex23 wuwe...@gmail.com wrote: I have since updated each ship's __init__ to accept all the

Traceback spoofing

2010-05-21 Thread Zac Burns
Why can't I inherit from traceback to 'spoof' tracebacks? I would like to create a traceback that is save-able to re-raise exceptions later without leaking all the locals. (I'm sure this idea has been discussed before but I can't find it anymore.) class Traceback(types.TracebackType): pass

Re: function that counts...

2010-05-21 Thread Bryan
Peter Pearson wrote: If it's important for the function to execute quickly for large n, you might get a useful speedup by testing only every ninth integer, Our standards for quickly and large seem kind of thin. I suspect that further applications of number theory would provide additional,

Re: gettext compatible, public domain collections of translations for strings commonly used in software applications?

2010-05-21 Thread Steven D'Aprano
On Fri, 21 May 2010 18:01:58 -0400, python wrote: It seems to me that there must be some public domain collection of translated strings that could be searched for 1:1 or fuzzy translations for strings commonly used in software applications? There must be? Is that a law of nature or something?

Re: links button gone from python.org

2010-05-21 Thread Aahz
In article 290f2f31-0893-469a-a12c-49eff9ffb...@y21g2000vba.googlegroups.com, eric_dex...@msn.com eric_dex...@msn.com wrote: I noticed that that the link to that section is gone. The page seems to be there when I use the url that is stored on my computer. What are you talking about? -- Aahz

Re: Traceback spoofing

2010-05-21 Thread Terry Reedy
On 5/21/2010 7:22 PM, Zac Burns wrote: Why can't I inherit from traceback to 'spoof' tracebacks? Because a) they are, at least in part, an internal implementation detail of CPython, and b) even if you could, Python would use the builtin original with exceptions, and c) you can probably do

Re: where are the program that are written in python?

2010-05-21 Thread Aahz
In article eb0c9aec-428f-45a2-a985-5b33906e0...@z17g2000vbd.googlegroups.com, Patrick Maupin pmau...@gmail.com wrote: There are a lot of commercial programs written in Python. But any company which thinks it has a lock on some kind of super secret sauce isn't going to use Python, because it's

Re: Traceback spoofing

2010-05-21 Thread exarkun
On 01:42 am, tjre...@udel.edu wrote: On 5/21/2010 7:22 PM, Zac Burns wrote: Why can't I inherit from traceback to 'spoof' tracebacks? Because a) they are, at least in part, an internal implementation detail of CPython, But you can just say this about anything, since there is no Python

Re: where are the program that are written in python?

2010-05-21 Thread Ben Finney
a...@pythoncraft.com (Aahz) writes: In article eb0c9aec-428f-45a2-a985-5b33906e0...@z17g2000vbd.googlegroups.com, Patrick Maupin pmau...@gmail.com wrote: There are a lot of commercial programs written in Python. But any company which thinks it has a lock on some kind of super secret

Re: Traceback spoofing

2010-05-21 Thread Zac Burns
Except you can't re-raise them. Yes, I should have noted that in the original post: raise RuntimeError, 'X', wrapped_traceback Traceback (most recent call last): File stdin, line 1, in module TypeError: raise: arg 3 must be a traceback or None Does someone know where the thread went about

Re: where are the program that are written in python?

2010-05-21 Thread Lie Ryan
On 05/22/10 04:47, Terry Reedy wrote: On 5/21/2010 6:21 AM, Deep_Feelings wrote: python is not a new programming language ,it has been there for the last 15+ years or so ? right ? however by having a look at this page http://wiki.python.org/moin/Applications i could not see many

Re: Another Go is Python-like article.

2010-05-21 Thread John Roth
On May 21, 8:20 am, Grant Edwards inva...@invalid.invalid wrote: In a recent Reg article, there's yet more yammering on about how Go is somehow akin to Python -- referring to Go as a Python-C++ crossbreed. http://www.theregister.co.uk/2010/05/20/go_in_production_at_google/ I still don't get

Re: where are the program that are written in python?

2010-05-21 Thread Chris Rebert
On Fri, May 21, 2010 at 8:03 PM, Lie Ryan lie.1...@gmail.com wrote: On 05/22/10 04:47, Terry Reedy wrote: On 5/21/2010 6:21 AM, Deep_Feelings wrote: python is not a new programming language ,it has been there for the last 15+ years or so ? right ? however by having a look at this page

How to show the current line number with pdb.set_trace()

2010-05-21 Thread Peng Yu
After starting pdb.set_trace(), python doens't show line number. Could you let me know how to print the number by default so that I know where the current line is? -- Regards, Peng -- http://mail.python.org/mailman/listinfo/python-list

Re: where are the program that are written in python?

2010-05-21 Thread Carl Banks
On May 21, 3:21 am, Deep_Feelings doctore...@gmail.com wrote: please don't mention programs where python was used as a glue ,those programs are not actually written in python. I hate to answer a troll, but I'll just mention that when people talk about a glue language, they're not talking about

[issue5753] CVE-2008-5983 python: untrusted python modules search path

2010-05-21 Thread Tomas Hoger
Tomas Hoger tho...@redhat.com added the comment: + - If the name of an existing script is passed in ``argv[0]``, its absolute + path is prepended to :data:`sys.path` Absolute path to the directory where script is located. And I believe there's no absolute path guarantee for platforms

[issue8765] Tests unwillingly writing unicocde to raw streams

2010-05-21 Thread Pascal Chambon
Pascal Chambon chambon.pas...@gmail.com added the comment: This would require patching separately py2k and py3k visibly... I'll have a look at it when I have time. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8765

[issue1289118] timedelta multiply and divide by floating point

2010-05-21 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Alexander, I still don't understand your objection. What's the downside of allowing the multiplication or division of a timedelta by a float? Perhaps it's true that there are applications where timedeltas are best viewed as integers (with

[issue8760] Python 2.6.5 fails to build on AIX 5.3

2010-05-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Do you have set the PYTHONHOME environment variable? this does not work from a build directory. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8760

[issue8720] undo findsource regression/change

2010-05-21 Thread holger krekel
holger krekel holger.kre...@gmail.com added the comment: David, your getsourcefile.patch looks fine (and better than mine) to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8720 ___

[issue8765] Tests unwillingly writing unicocde to raw streams

2010-05-21 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: pakal wrote: In test_fileio, one of the tests wants to ensure writing to closed raw streams fails, but it actually tries to write an unicode string I don't understand. Isn't b'xxx' and 'xxx' the same in py2.x? They are not unicode string, but

[issue1289118] timedelta multiply and divide by floating point

2010-05-21 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Python reference implementation showing how to do correct rounding. -- Added file: http://bugs.python.org/file17426/timedelta_arith.py ___ Python tracker rep...@bugs.python.org

[issue5753] CVE-2008-5983 python: untrusted python modules search path

2010-05-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Absolute path to the directory where script is located. And I believe there's no absolute path guarantee for platforms without realpath / GetFullPathName. Yes, this is more precise indeed. As for realpath(), I would expect it to be present on

[issue4870] ssl module is missing SSL_OP_NO_SSLv2

2010-05-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This was committed in r81392. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4870

[issue1289118] timedelta multiply and divide by floating point

2010-05-21 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: N.B. There's already logic for doing div_nearest (i.e., divide one integer by another, returning the closest integer to the result) in the long_round function in Objects/longobject.c. It might be worth pulling that logic out and making it

[issue8720] undo findsource regression/change

2010-05-21 Thread holger krekel
holger krekel holger.kre...@gmail.com added the comment: Well, maybe we could introduce a linecache.setlines function to give the linecache module control over its internal caching and data handling. What do you think? -- ___ Python tracker

[issue8774] tabnanny improperly handles non-ascii source files

2010-05-21 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Commited: r81393 (py3k), r81394 (3.1). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8774

[issue8765] Tests unwillingly writing unicocde to raw streams

2010-05-21 Thread Pascal Chambon
Pascal Chambon chambon.pas...@gmail.com added the comment: yes, but the same tests are used for py3k as well, where xxx is interpreted as unicode (2to3 tools dont try to guess if a py2k string intended to be a byte string or an unicode one). -- ___

[issue8765] Tests unwillingly writing unicocde to raw streams

2010-05-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: test_fileio and test_io both use from __future__ import unicode_literals, which means classical string literals construct unicode strings rather than byte strings. So, yes, Pascal is right, this should be corrected (both the tests, and the

[issue4007] make clean fails to delete .a and .so.X.Y files

2010-05-21 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Yes, make clean should remove *.a and *.so.* files. The patch looks ok. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4007

[issue2736] datetime needs an epoch method

2010-05-21 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: As you explain in your own documentation, the proposed method is equivalent to ``(time.mktime(self.timetuple()), self.microsecond)``, so all it does is replacing a less than a one-liner. a one-liner, but an horrible one liner

[issue2736] datetime needs an epoch method

2010-05-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I agree with Victor that the APIs need improving, even if it involves providing obvious replacements of obscure one-liners. As an occasional user of datetime and time modules, I have too often wanted to curse those limited, awkwardly

[issue6695] PyXXX_ClearFreeList for dict, set, and list

2010-05-21 Thread Matthias Troffaes
Changes by Matthias Troffaes matthias.troff...@gmail.com: Added file: http://bugs.python.org/file17427/py3k-rev81387-clearfreelist-dict_set_list.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6695

[issue6695] PyXXX_ClearFreeList for dict, set, and list

2010-05-21 Thread Matthias Troffaes
Changes by Matthias Troffaes matthias.troff...@gmail.com: Added file: http://bugs.python.org/file17428/py3k-rev81387-clearfreelist-gc_collect.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6695

[issue6695] PyXXX_ClearFreeList for dict, set, and list

2010-05-21 Thread Matthias Troffaes
Changes by Matthias Troffaes matthias.troff...@gmail.com: Added file: http://bugs.python.org/file17429/py3k-rev81387-clearfreelist-time_gc_collect.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6695

[issue6695] PyXXX_ClearFreeList for dict, set, and list

2010-05-21 Thread Matthias Troffaes
Matthias Troffaes matthias.troff...@gmail.com added the comment: I uploaded updates of the three relevant patches against the current revision of the py3k branch, as the old patches no longer applied cleanly due to whitespace changes. To summarize: * The first patch,

  1   2   >