ANN: wxPython 2.9.1.1

2010-10-22 Thread Robin Dunn
Announcing -- The 2.9.1.1 release of wxPython is now available for download at http://wxpython.org/download.php. This is the first official release in the 2.9 development release series. There are lots and lots of new widgets and other awesome stuff that have been added since the 2.8

ANN: Jug 0.7: Task based framework for python

2010-10-22 Thread Luis Pedro Coelho
Hello List, This is to let you know of a new release of Jug. Jug allows you to write code that is broken up into tasks and run different tasks on different processors. It uses the filesystem to communicate between processes and works correctly over NFS, so you can coordinate processes on

Re: Nested Mapping

2010-10-22 Thread Arnaud Delobelle
Raymond Hettinger pyt...@rcn.com writes: I'm considering a nested mapping class for the collections module and would like to solicit feedback from people here on comp.lang.python: http://code.activestate.com/recipes/577434-nested-contexts-a-chain-of-mapping-objects/ Django has such

Re: pylint -- should I just ignore it sometimes?

2010-10-22 Thread Steven D'Aprano
On Thu, 21 Oct 2010 20:04:10 +0100, Arnaud Delobelle wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Thu, 21 Oct 2010 11:37:36 +0200, Jean-Michel Pichavant wrote: By the way: xCoordinate, yCoordinate, zCoordinate = polygon.nextPointCoordinates() Coordinates are

Re: functions, list, default parameters

2010-10-22 Thread Steven D'Aprano
On Thu, 21 Oct 2010 19:53:53 -0700, John Nagle wrote: This is a common newbie stumbling-block: Don't use lists (or anything mutable) as default argument values That really should be an error. No it shouldn't. Punishing everybody for a newbie mistake that nobody makes twice would be

Re: python shell silently ignores termios.tcsetattr()

2010-10-22 Thread Lawrence D'Oliveiro
In message i9q2go$5...@reader1.panix.com, kj no.em...@please.post wrote: What's wrong with it is that what python thinks is a reasonable state is actually wrong in this case (it differs from the default setting established by the Emacs shell). I personally wouldn’t try to run one program that

Re: embarrassing class question

2010-10-22 Thread Steven D'Aprano
On Thu, 21 Oct 2010 12:12:34 -0700, Brendan wrote: Because y.py has from x import x the x class from x.py is added to the y.py namespace. ~Ethan~- Hide quoted text - - Show quoted text - So what is usually done to prevent this? (In my case not wanting class x added to the y.py

Re: pylint -- should I just ignore it sometimes?

2010-10-22 Thread Steven D'Aprano
On Thu, 21 Oct 2010 17:20:54 +0200, Jean-Michel Pichavant wrote: While I totally understand why some ppl prefer to use short names, Oh the irony. I really don't see the point in saying that because any information can be wrong, we should stop giving any. It's only in your fevered

Re: pylint -- should I just ignore it sometimes?

2010-10-22 Thread Steven D'Aprano
On Thu, 21 Oct 2010 10:47:28 -0400, Mel wrote: Long variable names can lie; they share this ability with comments. The one study** I've seen of newbie errors observed the #1 error being as assumption that descriptive variable names could somehow replace computation, e.g. that if you called a

Re: Nested Mapping

2010-10-22 Thread Peter Otten
Raymond Hettinger wrote: I'm considering a nested mapping class for the collections module and would like to solicit feedback from people here on comp.lang.python: http://code.activestate.com/recipes/577434-nested-contexts-a-chain-of- mapping-objects/ The class is an attempt to

How to do module configuration properly

2010-10-22 Thread Jan Kosinski
I have created a python module, which contains a bunch of utility functions that use a number of global variables (directory and file names, etc.). I want to move that global variables to an external configuration file and I want to load all global variables from that configuration file when

Re: functions, list, default parameters

2010-10-22 Thread Dave Angel
On 2:59 PM, Sean Choi wrote: I found two similar questions in the mailing list, but I didn't understand the explanations. I ran this code on Ubuntu 10.04 with Python 2.6.5. Why do the functions g and behave differently? If calls (3) and g(3) both exit their functions in the same

Re: embarrassing class question

2010-10-22 Thread Brendan
On Oct 22, 5:02 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Thu, 21 Oct 2010 12:12:34 -0700, Brendan wrote: Because y.py has from x import x the x class from x.py is added to the y.py namespace. ~Ethan~- Hide quoted text - - Show quoted text - So what is

Re: socket.sendto / UDP problem

2010-10-22 Thread Todd Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 22 Oct 2010 00:00:03 +0100 MRAB pyt...@mrabarnett.plus.com wrote: On 21/10/2010 21:05, Todd Walter wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 21 Oct 2010 17:03:58 +0100 MRABpyt...@mrabarnett.plus.com wrote:

Re: Re: embarrassing class question

2010-10-22 Thread Dave Angel
On 2:59 PM, Brendan wrote: On Oct 21, 3:56 pm, Ethan Furmanet...@stoneleaf.us wrote: snip Because y.py has from x import x the x class from x.py is added to the y.py namespace. ~Ethan~- Hide quoted text - - Show quoted text - So what is usually done to prevent this? (In my case not

Re: pythagorean triples exercise

2010-10-22 Thread Baba
On Oct 22, 8:07 am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Thu, 21 Oct 2010 03:51:07 -0700 (PDT), Baba raoul...@gmail.com declaimed the following in gmane.comp.python.general: Hi everyone i need a hint regarding the following exercise question: Write a program that generates

Re: socket.sendto / UDP problem

2010-10-22 Thread Todd Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 22 Oct 2010 00:00:03 +0100 MRAB pyt...@mrabarnett.plus.com wrote: On 21/10/2010 21:05, Todd Walter wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 21 Oct 2010 17:03:58 +0100 MRABpyt...@mrabarnett.plus.com wrote:

Re: pythagorean triples exercise

2010-10-22 Thread Baba
On Oct 22, 6:35 am, Terry Reedy tjre...@udel.edu wrote: On 10/21/2010 7:55 PM, Baba wrote: the bit i'm having difficulties with in constructing my loops is: whose small sides are no larger than n from math import sqrt def py_trips(n):    for b in range(4,n+1):      for a in

Re: how to scrutch a dict()

2010-10-22 Thread Ethan Furman
Neil Cerutti wrote: On 2010-10-21, James Mills prolo...@shortcircuit.net.au wrote: Rather than creating a new dict why don't you just do: def _scrunch(d): for k, v in d.items(): if v is None: del d[k] In Python 3, where items returns an iterator, modifying the dictionary in

Re: how to scrutch a dict()

2010-10-22 Thread Ethan Furman
John Nagle wrote: On 10/20/2010 9:32 PM, Phlip wrote: Not Hyp: def _scrunch(**dict): result = {} for key, value in dict.items(): if value is not None: result[key] = value return result That says throw away every item in a dict if the Value is None. Are there any

Re: pylint -- should I just ignore it sometimes?

2010-10-22 Thread Jean-Michel Pichavant
Seebs wrote: On 2010-10-21, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Let me quote the paper I linked in the previous post: list1 = [] for x in theList: if x[0] == 4: list1 += x; return list1 compare it to: flaggedCells = [] for cell in theBoard: if

Re: pythagorean triples exercise

2010-10-22 Thread Baba
On Oct 22, 6:35 am, Terry Reedy tjre...@udel.edu wrote: On 10/21/2010 7:55 PM, Baba wrote: the bit i'm having difficulties with in constructing my loops is: whose small sides are no larger than n from math import sqrt def py_trips(n):    for b in range(4,n+1):      for a in

Re: socket.sendto / UDP problem

2010-10-22 Thread Todd Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 22 Oct 2010 00:00:03 +0100 MRAB pyt...@mrabarnett.plus.com wrote: On 21/10/2010 21:05, Todd Walter wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 21 Oct 2010 17:03:58 +0100 MRABpyt...@mrabarnett.plus.com wrote:

Re: pylint -- should I just ignore it sometimes?

2010-10-22 Thread Jean-Michel Pichavant
Seebs wrote: On 2010-10-21, Jean-Michel Pichavant jeanmic...@sequans.com wrote: It can be short if descriptive: for o, c in cars: park(o) phone(c) for owner, car in cars: # by just using meaningful names you give the info to the reader that you expect cars to be

Re: Perforce integrate using p4 module

2010-10-22 Thread Chris Hulan
On Oct 21, 2:57 pm, Eric_NYRelEng atiqul.is...@gmail.com wrote: Does anyone have any example with perforce integrate command? Please help —Code Snippet— import P4 ##set p4.port, p4.client p4c = P4.P4() p4c.connect() view = “//depot/meta/project/frombranch/...//depot/meta/project/

Re: socket.sendto / UDP problem

2010-10-22 Thread Antoine Pitrou
On Fri, 22 Oct 2010 09:27:51 -0400 Todd Walter twal...@rogers.com wrote: Is there a way to specify the source port for a transmission without first binding to it? Of course not, why do you want to do so? (well, not using plain UDP or TCP, that is. You can of course do that through ad-hoc means

Python developers ver. installation failed

2010-10-22 Thread Mateusz Koryciński
Hi, I need to install Cogent via python installation script. Unfortunately after typing in command line: python setup.py build or python setup.py install (I've tried with sudo as well) I receive something like that: running install running build running build_py running build_ext building

Unix-head needs to Windows-ize his Python script (II)

2010-10-22 Thread gb345
In i9n9ed$q0...@reader1.panix.com gb345 gb...@invalid.com writes: I have a handy Python script, which takes a few command-line arguments, and accepts a few options. I developed it on Unix, with very much of a Unix-mindset. Some Windows-using colleagues have asked me to make the script easy to

Re: Python developers ver. installation failed

2010-10-22 Thread Robert Jackiewicz
On Fri, 22 Oct 2010 16:09:15 +0200, Mateusz Koryciński wrote: Hi, I need to install Cogent via python installation script. Unfortunately after typing in command line: python setup.py build or python setup.py install (I've tried with sudo as well) I receive something like that: running

Re: Unix-head needs to Windows-ize his Python script (II)

2010-10-22 Thread Tim Golden
On 22/10/2010 15:25, gb345 wrote: 3. Both versions of the app work fine on Windows 7, as long as I do the following: a. run CMD b. cd to where the GUI script and my original script live c. execute either C:\Python27\python myapp_tk.py or C:\Python27\python

Re: embarrassing class question

2010-10-22 Thread Brendan
On Oct 22, 9:16 am, Dave Angel da...@dejaviewphoto.com wrote: On 2:59 PM, Brendan wrote: On Oct 21, 3:56 pm, Ethan Furmanet...@stoneleaf.us  wrote: snip Because y.py has from x import x the x class from x.py is added to the y.py namespace. ~Ethan~- Hide quoted text - - Show quoted

Re: socket.sendto / UDP problem

2010-10-22 Thread Tom Pacheco
On 10/21/2010 4:05 PM, Todd Walter wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 21 Oct 2010 17:03:58 +0100 MRABpyt...@mrabarnett.plus.com wrote: On 21/10/2010 15:57, Todd Walter wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 21 Oct 2010 00:07:58 +0100

Re: socket.sendto / UDP problem

2010-10-22 Thread Todd Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 22 Oct 2010 10:53:45 -0400 Tom Pacheco tomsli...@netp.org wrote: On 10/21/2010 4:05 PM, Todd Walter wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 21 Oct 2010 17:03:58 +0100 MRABpyt...@mrabarnett.plus.com wrote:

Re: pywebkit - python bindings for webkit DOM (alpha)

2010-10-22 Thread deostroll
Hi, Any instructions on how to get started with the source code? --deostroll On Oct 8, 1:57 am, lkcl luke.leigh...@gmail.com wrote: apologies for the 3 copies of the post: mail.python.org's SMTP service was offline yesterday. just a quick update: XMLHttpRequest support has been fixed today,

Re: Nested Mapping

2010-10-22 Thread Robert Kern
On 10/21/10 6:19 PM, Raymond Hettinger wrote: I would appreciate any feedback on the API and on how well it fits with various use cases that you've found in the wild. We've done something similar in the past:

Re: Unix-head needs to Windows-ize his Python script (II)

2010-10-22 Thread gb345
In mailman.128.1287758336.2218.python-l...@python.org Tim Golden m...@timgolden.me.uk writes: On 22/10/2010 15:25, gb345 wrote: 3. Both versions of the app work fine on Windows 7, as long as I do the following: a. run CMD b. cd to where the GUI script and my original script live

Re: pylint -- should I just ignore it sometimes?

2010-10-22 Thread Seebs
On 2010-10-22, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Seebs wrote: The one that brought this up, though, was except FooError, e:, and in that case, there is no need for any further description; the description is provided by the except, and e is a perfectly reasonable, idiomatic,

Re: Unix-head needs to Windows-ize his Python script (II)

2010-10-22 Thread Ethan Furman
gb345 wrote: In mailman.128.1287758336.2218.python-l...@python.org Tim Golden m...@timgolden.me.uk writes: On 22/10/2010 15:25, gb345 wrote: 3. Both versions of the app work fine on Windows 7, as long as I do the following: a. run CMD b. cd to where the GUI script and my original

Re: pylint -- should I just ignore it sometimes?

2010-10-22 Thread Seebs
On 2010-10-22, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Seebs wrote: On 2010-10-21, Jean-Michel Pichavant jeanmic...@sequans.com wrote: list1 = [] for x in theList: if x[0] == 4: list1 += x; return list1 flaggedCells = [] for cell in theBoard: if

Re: pylint -- should I just ignore it sometimes?

2010-10-22 Thread Jean-Michel Pichavant
I'm all for descriptive names, but there's a great deal of benefit to knowing when a descriptive name will help, and when all you need is a variable which will be quickly recognized. Compare: [theValueInTheList.func() forTheValueInTheList in theList] [x.func() for x in list] One of these is

Re: Reading Outlook .msg file using Python

2010-10-22 Thread John Henry
On Oct 21, 1:48 am, Tim Golden m...@timgolden.me.uk wrote: On 21/10/2010 09:34, Jon Clements wrote: Only just noticed this thread, and had something similar. I took the following approach:- (I'm thinking this might be relevant as you mentioned checking whether your client'sOutlookcould

Re: pythagorean triples exercise

2010-10-22 Thread Peter Pearson
On Fri, 22 Oct 2010 01:35:11 -0400, Terry Reedy tjre...@udel.edu wrote: On 10/21/2010 7:55 PM, Baba wrote: the bit i'm having difficulties with in constructing my loops is: whose small sides are no larger than n from math import sqrt def py_trips(n): for b in range(4,n+1): for a

ANNOUNCE: NHI1-0.8, PLMK-1.6 und libmsgque-4.6

2010-10-22 Thread Andreas Otto
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear User, ANNOUNCE:Major Feature Release libmsgque: Application-Server-Toolkit for C, C++, JAVA, C#, TCL, PERL, PYTHON, RUBY, VB.NET PLMK: Programming-Language-Microkernel NHI1:

Re: How to do module configuration properly

2010-10-22 Thread John Nagle
On 10/22/2010 4:22 AM, Jan Kosinski wrote: I have created a python module, which contains a bunch of utility functions that use a number of global variables (directory and file names, etc.). I want to move that global variables to an external configuration file and I want to load all global

Re: embarrassing class question

2010-10-22 Thread Peter Pearson
On Fri, 22 Oct 2010 07:49:39 -0700 (PDT), Brendan wrote: [snip] x.py class X(object): pass y.py import x class Y(x.X): pass z.py import x import y class ZX(x.X): pass class ZY(y.Y): pass w.py import x import y import z class WX(x.X): pass class WY(y.Y):

Re: socket.sendto / UDP problem

2010-10-22 Thread Todd Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thank you all for your help, I now have a functioning interface. As it turns out, trying to do things the correct way was wrong. The timing was so tight that doing anything (such as traversing the while-loop once) instead of a read immediately after

Re: pythagorean triples exercise

2010-10-22 Thread MRAB
On 22/10/2010 13:33, Baba wrote: On Oct 22, 8:07 am, Dennis Lee Bieberwlfr...@ix.netcom.com wrote: On Thu, 21 Oct 2010 03:51:07 -0700 (PDT), Babaraoul...@gmail.com declaimed the following in gmane.comp.python.general: Hi everyone i need a hint regarding the following exercise question:

Re: pylint -- should I just ignore it sometimes?

2010-10-22 Thread Seebs
On 2010-10-22, Jean-Michel Pichavant jeanmic...@sequans.com wrote: I'm all for descriptive names, but there's a great deal of benefit to knowing when a descriptive name will help, and when all you need is a variable which will be quickly recognized. Compare: [theValueInTheList.func()

Re: how to scrutch a dict()

2010-10-22 Thread John Nagle
On 10/22/2010 6:10 AM, Ethan Furman wrote: John Nagle wrote: class nonnulldict(dict) : def __setitem__(self, k, v) : if not (v is None) : dict.__setitem__(self, k, v) That creates a subclass of dict which ignores stores of None values. So you never store the unwanted items at all. It's

Re: socket.sendto / UDP problem

2010-10-22 Thread Tom Pacheco
On 10/21/2010 4:05 PM, Todd Walter wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 21 Oct 2010 17:03:58 +0100 MRABpyt...@mrabarnett.plus.com wrote: On 21/10/2010 15:57, Todd Walter wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 21 Oct 2010 00:07:58 +0100

Re: how to scrutch a dict()

2010-10-22 Thread Ethan Furman
John Nagle wrote: On 10/22/2010 6:10 AM, Ethan Furman wrote: John Nagle wrote: class nonnulldict(dict) : def __setitem__(self, k, v) : if not (v is None) : dict.__setitem__(self, k, v) That creates a subclass of dict which ignores stores of None values. So you never store the unwanted

Re: memory management - avoid swapping/paging

2010-10-22 Thread Jon Clements
On 21 Oct, 16:45, Nobody nob...@nowhere.com wrote: On Thu, 21 Oct 2010 02:34:15 -0700, Jon Clements wrote: I'm after something that says: I want 512mb of physical RAM, I don't want you to page/swap it, if you can't do that, don't bother at all. Now I'm guessing, that an OS might be able to

Re: pythagorean triples exercise

2010-10-22 Thread Mel
MRAB wrote: On 22/10/2010 13:33, Baba wrote: only a has an upper limit of 200 Really? The quote you gave included whose small sides are no larger than n. Note: sides, plural. Strangely, there does seem to be a limit. Fixing one side at 200, the largest pythagorean triple I have found is

Re: pythagorean triples exercise

2010-10-22 Thread Mel
Mel wrote: MRAB wrote: On 22/10/2010 13:33, Baba wrote: only a has an upper limit of 200 Really? The quote you gave included whose small sides are no larger than n. Note: sides, plural. Strangely, there does seem to be a limit. Fixing one side at 200, the largest pythagorean triple I

Re: pythagorean triples exercise

2010-10-22 Thread Jeffrey Gaynor
As I indicated, generating such triples is easy. What you found is the edge case that 2*i*j = 200 = 100 = i*j so (i,j) = (100,1) or (50,2) (25,4), (20,5) or (10,10). The maximal value are i = 100, j = 1. The other sides are i^2 - j^2 = 10,000 - 1 = i^2 + j^2 = 10,000 + 1 = 10,001

Re: tkMessageBox

2010-10-22 Thread Dardo Schuster
Try import tkinter.messagebox as tkMessageBox -- http://mail.python.org/mailman/listinfo/python-list

A good decorator library

2010-10-22 Thread Felipe Bastos Nunes
Hi! I was looking for a good decorator library to study and make my own decorators. I've read the Bruce Eckel's blog at artima dot com. But I need some more examples. I'm building a WSN simulator like SHOX is in java, but programming it in python. I'd like to use decorators to set methods that

Re: Nested Mapping

2010-10-22 Thread Raymond Hettinger
On Oct 22, 4:17 am, Peter Otten __pete...@web.de wrote: I just read the recipe, and it looks good to me except for the len() and iter() implementations: a = Context() a[x] = 1 b = a.new_child() b[x] = 2 len(b) 2 b.keys() ['x', 'x'] I would have expected equal keys to

nntplib and ssl

2010-10-22 Thread Andrew
I'm working on a personal project that, among other things, needs to talk to a news server. Python's nntplib seems ideal for my purposes, but as far as I can see it doesn't support nntps connections. If I understand nntp correctly (I may not) that means, among other things, it sends passwords in

Re: Unix-head needs to Windows-ize his Python script (II)

2010-10-22 Thread python
I much prefer the wx version of the GUI over the tk version of my app. Check out Python 2.7's Tkinter support for Tile. The enhanced version of Tkinter that ships with 2.7 supports native OS themes across all platforms giving you very professional looking user interfaces. wx has lots more

Re: nntplib and ssl

2010-10-22 Thread Antoine Pitrou
On Fri, 22 Oct 2010 17:02:07 -0400 Andrew n...@none.com wrote: Python's nntplib seems ideal for my purposes, but as far as I can see it doesn't support nntps connections. If I understand nntp correctly (I may not) that means, among other things, it sends passwords in cleartext. That won't

Question on multiple python environments in Apache

2010-10-22 Thread Jeffrey Gaynor
I have several different versions of a web app that run under Apache. The issue is that I need to have several different configurations available under several environments (such as Django, mod_python and plain vanilla mod_wsgi). Is there a simple way to get several of these to be completely

Re: Nested Mapping

2010-10-22 Thread Raymond Hettinger
On Oct 22, 8:48 am, Robert Kern robert.k...@gmail.com wrote: On 10/21/10 6:19 PM, Raymond Hettinger wrote: I would appreciate any feedback on the API and on how well it fits with various use cases that you've found in the wild. We've done something similar in the past:

Re: Nested Mapping

2010-10-22 Thread Raymond Hettinger
On Oct 21, 6:13 pm, Paul Rubin no.em...@nospam.invalid wrote: Raymond Hettinger pyt...@rcn.com writes: The c.parent.parent.parent chain finds successive enclosing contexts: I was asking about finding the child contexts, not the parents.  This is analogous to how you can find the keys in a

Re: Nested Mapping

2010-10-22 Thread Ethan Furman
Raymond Hettinger wrote: On Oct 21, 5:18 pm, Paul Rubin no.em...@nospam.invalid wrote: The API you suggested looks reasonable although you should also say how to delete a context, how to find the inner contexts of a context, etc. The c.parent.parent.parent chain finds successive enclosing

Re: pythagorean triples exercise

2010-10-22 Thread Lawrence D'Oliveiro
In message cdea67ad-2d9c-4d30-9055-62e62d4c5...@p26g2000yqb.googlegroups.com, Baba wrote: csqrt = math.sqrt(csqrd) for c in range (1, csqrd): if c * c == a * a + b * b and math.floor(csqrt) == csqrt: print (a,b,c) Is there such a term as

paypal wholesale world cup 2010 football jersey

2010-10-22 Thread maggie
paypal wholesale world cup 2010 football jersey England www.supertrade06.com paypal wholesale world cup 2010 football jersey France www.supertrade06.com paypal wholesale world cup 2010 football jersey New Zealand paypal wholesale world cup 2010 football jersey Portugal www.supertrade06.com

IDLE debugger questions

2010-10-22 Thread Roger Davis
Hi, I have some questions about the IDLE debugger. I am using the 2.6.6 bundle downloaded from python.org. First, how do I debug a Python program that requires command-line args? I usually run it with a command like % test.py arg1 arg2 arg3 There seems to be practically no detailed IDLE

Re: IDLE debugger questions

2010-10-22 Thread Ned Deily
In article 04a3c943-5aee-4248-9cb3-60ea42410...@j4g2000prm.googlegroups.com, Roger Davis r...@hawaii.edu wrote: Hi, I have some questions about the IDLE debugger. I am using the 2.6.6 bundle downloaded from python.org. First, how do I debug a Python program that requires command-line args?

ftplib - Did the whole file get sent?

2010-10-22 Thread Sean DiZazzo
Hi, I have some scripts that send files via ftplib to a client's ftp site. The scripts have generally worked great for a few years. Recently, the client complained that only part of an important file made it to their server. My boss got this complaint and brought it to my attention. The first

Re: Nested Mapping

2010-10-22 Thread Steven D'Aprano
On Thu, 21 Oct 2010 16:19:43 -0700, Raymond Hettinger wrote: I'm considering a nested mapping class for the collections module and would like to solicit feedback from people here on comp.lang.python: http://code.activestate.com/recipes/577434-nested-contexts-a-chain- of-mapping-objects/

Re: ftplib - Did the whole file get sent?

2010-10-22 Thread Steven D'Aprano
On Fri, 22 Oct 2010 22:03:38 -0700, Sean DiZazzo wrote: How can I assure him (and the client) that the transfer completed successfully like my log shows? It has worked well for many years, there are no reported bugs in the ftp code, and the logs show the file was transferred correctly. Unless

[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2010-10-22 Thread Vladimir Iofik
Vladimir Iofik v-io...@yandex.ru added the comment: Here is a better patch. -- nosy: +vj Added file: http://bugs.python.org/file19332/9291a.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9291

[issue10166] maximum recursion depth exceeded in lib\pstats.py

2010-10-22 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r85787. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10166

[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2010-10-22 Thread Vladimir Iofik
Vladimir Iofik v-io...@yandex.ru added the comment: UnicodeDecodeException is thrown because 'ctype' is already a string, so it is first implicitly decoded by default encoder (which is 'ascii') and then reencoded back. I see no reason in all these actions, so I simply removed them. I think

[issue10147] Python Documentation bugs

2010-10-22 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: All the words that Georg Brandl fixed for this issue are okay as they stand. Please leave them as they are written. Thank you. On Fri, Oct 22, 2010 at 1:19 AM, Marc-Andre Lemburg rep...@bugs.python.orgwrote: Marc-Andre Lemburg

[issue3902] distutils does not create __init__.py for packages containing extension modules

2010-10-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for the report. To the best of my knowledge, distutils never generates Python files, and the docs for ext_modules or ext_package don’t imply __init__.py will be generated. IOW, for “pkg.foo”, you’re supposed to have pkg/__init__.py and

[issue3902] distutils does not create __init__.py for packages containing extension modules

2010-10-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- Removed message: http://bugs.python.org/msg113049 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3902 ___

[issue7639] bdist_msi fails on files with long names

2010-10-22 Thread Christoph Gohlke
Christoph Gohlke cgoh...@uci.edu added the comment: Creating bdist_msi installers with files such as 'aixc++' (containing '+'), '.buildinfo' (starting with '.'), and 'py.~1.5.~' (containing '~') currently also fails, even with the proposed patch. The revised patch should fix these cases and

[issue6011] python doesn't build if prefix contains non-ascii characters

2010-10-22 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: $ LC_ALL=C ./python Fatal Python error: Py_Initialize: Unable to get the locale encoding SystemError: NULL result without error in PyObject_Call Abandon What is your Python version? I fixed Python 3.2, but I don't plan to fix

[issue7726] Remove required metadata warnings for sdist

2010-10-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I don’t think warnings should be removed, at least not by default. They’re warnings, not errors, which is IMO a nice compromise between accepting anything and requiring that rules be followed. We could add an option like --no-warnings in

[issue7726] Remove required metadata warnings for sdist

2010-10-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- Removed message: http://bugs.python.org/msg113019 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7726 ___

[issue1274324] 'setup.py install' fail on linux from read-only storage

2010-10-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- assignee: - eric.araujo nosy: -terry.reedy versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1274324

[issue9167] argv double encoding on OSX

2010-10-22 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: FYI, you should use ascii() instead of a.encode(\utf8\) to dump arguments. It's easier to check '\u2603' than b'\xe2\x98\x83' for me :-) So the bug is fixed in Python 3.2, great! I was thinking that we need a test for that, but

[issue4032] distutils cannot recognize .dll.a as library on cygwin

2010-10-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Can you produce a patch? (Removing Terry from nosy at his request) -- components: +Distutils2 nosy: +eric.araujo -terry.reedy versions: +3rd party, Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue4032] distutils cannot recognize .dll.a as library on cygwin

2010-10-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- Removed message: http://bugs.python.org/msg113008 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4032 ___

[issue5926] bdist_msi - add support for minimum Python version for pure Python packages

2010-10-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: distutils is frozen, new features land into distutils2 (http://bitbucket.org/tarek/distutils2/). Do you want to work on a patch? -- components: +Distutils2 -Distutils nosy: +eric.araujo stage: - needs patch versions: +3rd party -Python

[issue5936] Add MSI suport for uninstalling individual versions

2010-10-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: “For example, if you installed a new version of Python, this would allow you to add your already installed pure Python modules to this Python installation by just going to Add/Remove Programs and selecting the feature for the new version.” Would

[issue1128] msilib.Directory.make_short only handles file names with a single dot in them

2010-10-22 Thread Christoph Gohlke
Christoph Gohlke cgoh...@uci.edu added the comment: The revised patch for issue7639 now generates better short names for file names containing spaces, '+', and leading '.'. http://bugs.python.org/file19334/msilib.diff Test cases that could be added to MsilibTest.test_makeshort(): TEST

[issue1371826] distutils is silent about multiple -I/-L/-R

2010-10-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Skip, do you agree with my proposal (no behavior change in d1, better behavior in d2) or do you think it could be confusing? -- ___ Python tracker rep...@bugs.python.org

[issue10126] test_distutils failure with --enable-shared

2010-10-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: You broke many 2.7, 3.1 and 3.x buildbots. -- priority: high - critical resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10126

[issue5936] Add MSI suport for uninstalling individual versions

2010-10-22 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: Would you have to do this for every installed distribution? Seems cumbersome. Well, the feature not being implemented yet, it's hard to tell what it would do. ;-) But I think the simplest approach would actually yield a dialog where

[issue4032] distutils cannot recognize .dll.a as library on cygwin

2010-10-22 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I used to create the patch http://bugs.python.org/file11597/experimental_distutils.patch in #1706863, but cygwin guys wanted this code implemented in CCygwinCompiler class (See #2445). I think #2445 should be resolved before.

[issue4032] distutils cannot recognize .dll.a as library on cygwin

2010-10-22 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Can you port that patch? I don't have cygwin installed now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4032 ___

[issue10027] os.lstat/os.stat don't set st_nlink on Windows

2010-10-22 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I created test branch branches/py3k-stat-on-windows and committed the new patch in r85789. This achieves msg119108. I tested this on Windows7 buildbot where symlink support exists, it seems working correct.

[issue9289] test_long_key(test_winreg) fails on win2k + py2.x

2010-10-22 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I committed in r85790(release27-maint). -- resolution: - fixed stage: patch review - committed/rejected status: open - closed title: Skip test_long_key(test_winreg) on win2k + py2.x - test_long_key(test_winreg) fails on

[issue10164] Add an assertBytesEqual to unittest and use it for bytes assertEqual

2010-10-22 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- title: Add an assertBytesMultiLineEqual to unittest and use it for bytes assertEqual - Add an assertBytesEqual to unittest and use it for bytes assertEqual ___ Python tracker

[issue10171] Ugly buttons in some Tkinter objects in Windows

2010-10-22 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +gpolo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10171 ___ ___ Python-bugs-list

[issue10172] code block has no syntax coloring

2010-10-22 Thread Winston C. Yang
New submission from Winston C. Yang wins...@cs.wisc.edu: The following code block in http://docs.python.org/tutorial/errors.html has no syntax coloring: import sys try: f = open('myfile.txt') s = f.readline() i = int(s.strip()) except IOError as (errno, strerror): print I/O

[issue6011] python doesn't build if prefix contains non-ascii characters

2010-10-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I’m trying to build py3k on posix in a subdir called sep-build-dir-éric, with locale set to C. I get these errors: gcc [...] -DSVNVERSION=\`LC_ALL=C svnversion ..`\ -o Modules/getbuildinfo.o ../Modules/getbuildinfo.c svn: Error converting entry

  1   2   >