[ANN] Next meeting of pyCologne, November, 11th

2009-11-08 Thread Thomas Lenarz
The next meeting of pyCologne (Cologne, Germany) will take place Wednesday, November, 11th starting about 6.30 pm - 6.45 pm at Room 0.14, Benutzerrechenzentrum (RRZK-B) University of Cologne, Berrenrather Str. 136, 50937 Köln, Germany Agenda: * Beyond MVC - The ZOPE-Component-Model

Re: Serious Privileges Problem: Please Help

2009-11-08 Thread Victor Subervi
restorecon didn't change ls -lZ output Can you give me the exact command for chcon? It complains there are too few arguments, and I couldn't figure it out. Does this really matter? I moved the selinux folder and its contents as well as sent an echo 0... command to kill it. Furthermore,

Re: How convert string '1e7' to an integer?

2009-11-08 Thread Roel Schroeven
Gary Herron schreef: Mensanator wrote: On Nov 7, 7:17 pm, Peng Yu pengyu...@gmail.com wrote: It seems that int() does not convert '1e7'. Because 'e' isn't a valid character in base 10. But 1e7 is a valid float, so this works: int(float('1e7')) 1000 That has a

Re: is None or == None ?

2009-11-08 Thread Hrvoje Niksic
Alf P. Steinbach al...@start.no writes: * Hrvoje Niksic: Alf P. Steinbach al...@start.no writes: Speedup would likely be more realistic with normal implementation (not fiddling with bit-fields and stuff) I'm not sure I understand this. How would you implement tagged integers without

Re: is None or == None ?

2009-11-08 Thread Alf P. Steinbach
* Hrvoje Niksic: Alf P. Steinbach al...@start.no writes: * Hrvoje Niksic: Alf P. Steinbach al...@start.no writes: Speedup would likely be more realistic with normal implementation (not fiddling with bit-fields and stuff) I'm not sure I understand this. How would you implement tagged

'ascii' codec can't encode character u'\xe4' in position 4: ordinal not in range(128)

2009-11-08 Thread balavignesh
Hello friends, I am using pyWPS + GRASS to generate the maps for the given request XML. As my requestxml contains scandinavian letters , i got the following error, 'ascii' codec can't encode character u'\xe4' in position 4: ordinal not in range(128) The Request xml

Re: My own accounting python euler problem

2009-11-08 Thread Ozz
Hi, My first question is: 1. given a list of invoives I=[500, 400, 450, 200, 600, 700] and a check Ch=600 how can I print all the different combinations of invoices that the check is possibly cancelling Incidentally, I'm currently learning python myself, and was working on more or less the

Re: Serious Privileges Problem: Please Help

2009-11-08 Thread Rami Chowdhury
On Saturday 07 November 2009 23:59:23 Victor Subervi wrote: restorecon didn't change ls -lZ output Did the suggested changes to the Apache configuration help at all? Can you give me the exact command for chcon? It complains there are too few arguments, and I couldn't figure it out. For

Re: 'ascii' codec can't encode character u'\xe4' in position 4: ordinal not in range(128)

2009-11-08 Thread Ben Finney
balavignesh kbalavign...@gmail.com writes: Whats the wrong in my code? Without seeing your code, all we could do is guess, poorly. Far better would be if you can construct a very small example, one that you post here so any reader here could run it, that demonstrates the behaviour you want

Re: My own accounting python euler problem

2009-11-08 Thread Robert P. J. Day
On Sun, 8 Nov 2009, Ozz wrote: Hi, My first question is: 1. given a list of invoives I=[500, 400, 450, 200, 600, 700] and a check Ch=600 how can I print all the different combinations of invoices that the check is possibly cancelling Incidentally, I'm currently learning python

Re: My own accounting python euler problem

2009-11-08 Thread Ozz
Oops, For listing all different subsets of a list (This is what I came up with. Can it be implemented shorter, btw?): def subsets(L): S = [] if (len(L) == 1): return [L, []] better to check for the empty set too, thus; if (len(L) == 0):

Re: How convert string '1e7' to an integer?

2009-11-08 Thread Thomas
Just a curiosity, why does Python do this? l = [(base, int('1e7', base=base)) for base in range(15,37)] l [(15, 442), (16, 487), (17, 534), (18, 583), (19, 634), (20, 687), (21, 742), (22, 799), (23, 858), (24, 919), (25, 982), (26, 1047), (27, 1114), (28, 1183), (29, 1254), (30, 1327), (31,

Re: Most efficient way to pre-grow a list?

2009-11-08 Thread gil_johnson
On Nov 6, 8:46 pm, gil_johnson gil_john...@earthlink.net wrote: I don't have the code with me, but for huge arrays, I have used something like: arr[0] = initializer for i in range N:      arr.extend(arr) This doubles the array every time through the loop, and you can add the powers of

Re: How convert string '1e7' to an integer?

2009-11-08 Thread Mick Krippendorf
Thomas wrote: Just a curiosity, why does Python do this? [(base, int('1e7', base=base)) for base in range(15,37)] [(15, 442), (16, 487), (17, 534), (18, 583), (19, 634), (20, 687), (21, 742), (22, 799), (23, 858), (24, 919), (25, 982), (26, 1047), (27, 1114), (28, 1183), (29, 1254), (30,

Re: Cancelling a python thread (revisited...)

2009-11-08 Thread exarkun
On 12:40 pm, s...@uni-hd.de wrote: On Nov 8, 4:27�am, Carl Banks pavlovevide...@gmail.com wrote: It doesn't sound like the thread is communicating with the process much. �Therefore: There is quite a bit of communication -- the computation results are visulized while they are generated. I'm

Re: Cancelling a python thread (revisited...)

2009-11-08 Thread Antoine Pitrou
Le Sun, 08 Nov 2009 04:40:26 -0800, sven a écrit : I really don't get that. If the reason would be that it is too much work to implement, then I could accept it. It would probably be a lot of work and even then it would still be unsafe. Read for example:

Re: Most efficient way to pre-grow a list?

2009-11-08 Thread gb345
In mailman.44.1257626420.2873.python-l...@python.org Luis Alberto Zarrabeitia Gomez ky...@uh.cu writes: ¿Have you ever tried to read list/matrix that you know it is not sparse, but you jdon't know the size, and it may not be in order? A grow-able array would just be the right thing to use -

Query about doing fortran-esque repeat formatting

2009-11-08 Thread Rob Briggs
Hello, Is there a way to do a repeat formatting command like in Fortran? Rather that doing this: print %s %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f % (parmName[i], tmp[i][1], tmp[i][2], tmp[i][4], tmp[i][6], tmp[i][7], tmp[i][8], tmp[i][9]) Something like this: print %s 7%-5.3f %

PySiteCreator v0.1 released

2009-11-08 Thread vasudevram
Hi group, I've released a tool for creating HTML pages or Web sites by writing them in Python - PySiteCreator v0.1. Description of PySiteCreator: PySiteCreator is a tool that allows the user to create Web (HTML) sites by writing them entirely in Python. A user creates one or more Python source

Need help for my system python

2009-11-08 Thread Luca Fabbri
Hi all. I've recently updated my system to the last Kubuntu 9.10. On my system I use: python2.6 (default system python) python 2.4 (needed for the Zope application server) Also I have 2 easy_install script for installing my eggs. The default one for python2.6 works normally, but I've some

Re: Query about doing fortran-esque repeat formatting

2009-11-08 Thread Mensanator
On Nov 8, 8:56�am, Rob Briggs rdbri...@mun.ca wrote: Hello, Is there a way to do a repeat formatting command like in Fortran? Rather that doing this: print %s %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f % (parmName[i], tmp[i][1], tmp[i][2], tmp[i][4], �tmp[i][6], �tmp[i][7],

Re: Need help for my system python

2009-11-08 Thread Luca Fabbri
SOLVED. For some reason a zope directory were inside my site-packages folder, so the zope.interface egg was not visible... On Sun, Nov 8, 2009 at 4:57 PM, Luca Fabbri l...@keul.it wrote: Hi all. I've recently updated my system to the last Kubuntu 9.10. On my system I use: python2.6 (default

Re: My own accounting python euler problem

2009-11-08 Thread Dan Bishop
On Nov 8, 4:43 am, Ozz notva...@wathever.com wrote: Hi, My first question is: 1. given a list of invoives I=[500, 400, 450, 200, 600, 700] and a check Ch=600 how can I print all the different combinations of invoices that the check is possibly cancelling Incidentally, I'm currently

Help with OS X installation

2009-11-08 Thread stephen_b
I have python 2.6 on OS X 10.5.8: $ python --version Python 2.6.2 $ which python /Library/Frameworks/Python.framework/Versions/2.6/bin/python When installing an egg, python 2.5 shows up: $ sudo easy_install ipython-0.10-py2.6.egg Password: Processing ipython-0.10-py2.6.egg removing

ODES

2009-11-08 Thread NGABONZIZA PROSPER
Hi all; Help! Could you Tell me where I may find documentation on Solving Differential equations with Scipy or Numpy. Thank you all -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with OS X installation

2009-11-08 Thread Diez B. Roggisch
stephen_b schrieb: I have python 2.6 on OS X 10.5.8: $ python --version Python 2.6.2 $ which python /Library/Frameworks/Python.framework/Versions/2.6/bin/python When installing an egg, python 2.5 shows up: $ sudo easy_install ipython-0.10-py2.6.egg Password: Processing

Re: My own accounting python euler problem

2009-11-08 Thread vsoler
On Nov 8, 1:27 pm, Ozz notva...@wathever.com wrote: Robert P. J. Day schreef:   does your solution allow for the possibility of different invoices of equal amounts?  i would be reluctant to use the word subset in a context where you can have more than one element with the same value. I

Re: My own accounting python euler problem

2009-11-08 Thread MRAB
Ozz wrote: Hi, My first question is: 1. given a list of invoives I=[500, 400, 450, 200, 600, 700] and a check Ch=600 how can I print all the different combinations of invoices that the check is possibly cancelling Incidentally, I'm currently learning python myself, and was working on more

Re: Serious Privileges Problem: Please Help

2009-11-08 Thread Rami Chowdhury
On Sunday 08 November 2009 05:44:31 Victor Subervi wrote: [r...@13gems angrynates.com]# chcon -u unconfined_u -r object_r -t httpd_sys_content_t global_solutions chcon: can't apply partial context to unlabeled file global_solutions Please advise. Try 'chcon -R -h

Re: My own accounting python euler problem

2009-11-08 Thread geremy condra
On Sun, Nov 8, 2009 at 11:52 AM, Dan Bishop danb...@yahoo.com wrote: On Nov 8, 4:43 am, Ozz notva...@wathever.com wrote: Hi, My first question is: 1. given a list of invoives I=[500, 400, 450, 200, 600, 700] and a check Ch=600 how can I print all the different combinations of invoices

Re: My own accounting python euler problem

2009-11-08 Thread geremy condra
On Sun, Nov 8, 2009 at 12:31 PM, geremy condra debat...@gmail.com wrote: On Sun, Nov 8, 2009 at 11:52 AM, Dan Bishop danb...@yahoo.com wrote: On Nov 8, 4:43 am, Ozz notva...@wathever.com wrote: Hi, My first question is: 1. given a list of invoives I=[500, 400, 450, 200, 600, 700] and a

Re: Serious Privileges Problem: Please Help

2009-11-08 Thread Victor Subervi
[r...@13gems angrynates.com]# chcon -R -h unconfined_u:object_r:httpd_sys_content_t global_solutions/* Then I surfed to http://209.216.9.56/global_solutions/index.py [r...@13gems angrynates.com]# tail /var/log/messages Nov 8 04:26:02 13gems syslogd 1.4.1: restart. [r...@13gems angrynates.com]#

Re: ODES

2009-11-08 Thread geremy condra
On Sun, Nov 8, 2009 at 12:01 PM, NGABONZIZA PROSPER ngabonziza...@gmail.com wrote: Hi all; Help! Could you Tell me where I may find documentation  on Solving Differential equations  with Scipy or Numpy. Thank you all -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with OS X installation

2009-11-08 Thread Benjamin Kaplan
On Sun, Nov 8, 2009 at 11:57 AM, stephen_b redplusbluemakespur...@gmail.com wrote: I have  python 2.6 on OS X 10.5.8: $ python --version Python 2.6.2 $ which python /Library/Frameworks/Python.framework/Versions/2.6/bin/python When installing an egg, python 2.5 shows up: $ sudo

list vs tuple for a dict key- why aren't both hashable?

2009-11-08 Thread Wells
I'm not quite understanding why a tuple is hashable but a list is not. Any pointers? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Cancelling a python thread (revisited...)

2009-11-08 Thread John Nagle
Antoine Pitrou wrote: Le Sun, 08 Nov 2009 04:40:26 -0800, sven a écrit : I really don't get that. If the reason would be that it is too much work to implement, then I could accept it. It would probably be a lot of work and even then it would still be unsafe. Read for example:

Re: list vs tuple for a dict key- why aren't both hashable?

2009-11-08 Thread Dj Gilcrease
On Sun, Nov 8, 2009 at 11:15 AM, Wells we...@submute.net wrote: I'm not quite understanding why a tuple is hashable but a list is not. Any pointers? Thanks! tuple is hashable because it is immutable whereas a list is mutable. -- http://mail.python.org/mailman/listinfo/python-list

Re: list vs tuple for a dict key- why aren't both hashable?

2009-11-08 Thread Tycho Andersen
On Sun, 8 Nov 2009, Wells wrote: I'm not quite understanding why a tuple is hashable but a list is not. Any pointers? Thanks! The keys of a dict have to be immutable. Lists are mutable, tuples are not. \t -- http://mail.python.org/mailman/listinfo/python-list

Re: list vs tuple for a dict key- why aren't both hashable?

2009-11-08 Thread MRAB
Wells wrote: I'm not quite understanding why a tuple is hashable but a list is not. Any pointers? Thanks! A hash is created from the object. If the object is mutable then the hash can change. Lists are mutable but tuples aren't. -- http://mail.python.org/mailman/listinfo/python-list

Indentation problems

2009-11-08 Thread Ray Holt
I am having problems with indentation some times. When I hit the enter key after if statements or while statemt there are times when the indentation is too much and other times too little. When I try to manually make sure the indentation is correct and try to print, I ge the error message of

Re: Looking for help getting tkinter to work.

2009-11-08 Thread Shue Boks
On Nov 1, 6:27 am, Francesco Bochicchio bieff...@gmail.com wrote: On Nov 1, 4:06 am, Shue Boks shoebox56car...@gmail.com wrote: I tried to compile Python and Tcl/Tk on Linux using the following files: Python-3.1.1.tar.gz tcl8.5.7-src.tar.gz Cannot get tkinter to work after

Re: My own accounting python euler problem

2009-11-08 Thread Ozz
vsoler schreef: Instead of subsets, do you mean permutations/combinations? Since 2 invoices can have the same amount perhaps the terms permutation is better. As some other poster already suggested 'powerset' ( http://en.wikipedia.org/wiki/Power_set ) may be a better name, except for those

Re: Cancelling a python thread (revisited...)

2009-11-08 Thread Antoine Pitrou
John Nagle nagle at animats.com writes: I'd argue against general thread cancellation. Inter-thread signals, though, have safety problems no worse than the first-thread only signals we have now. You're allowed to raise an exception in a signal handler, which is effectively thread

Re: is None or == None ?

2009-11-08 Thread Terry Reedy
Alf P. Steinbach wrote: * Hrvoje Niksic: Alf P. Steinbach al...@start.no writes: * Hrvoje Niksic: Alf P. Steinbach al...@start.no writes: Speedup would likely be more realistic with normal implementation (not fiddling with bit-fields and stuff) I'm not sure I understand this. How would

Re: Indentation problems

2009-11-08 Thread Tim Chase
I am having problems with indentation some times. When I hit the enter key after if statements or while statemt there are times when the indentation is too much and other times too little. Which editor are you using? On which operating system? Check for settings regarding spaces-per-tab,

Re: Spam Bot, broken pipe

2009-11-08 Thread Michael Torrie
Someone Something wrote: I have a irc spam bot (only testing on my channel :P ) whose main loop is the following: Poor choice of words on your part. Anything spam-related is evil and will not get a response. That said, IRC bots are certainly okay and common, and are useful tools. Some are

Re: pyserial vs. Linux power save hibernate/resume - program hangs

2009-11-08 Thread Ned Deily
In article 4af71b7e$0$1645$742ec...@news.sonic.net, John Nagle na...@animats.com wrote: I have an application running with pyserial talking to a USB to serial converter on a Linux EeePC 2G Surf. This works. Until the lid on the PC is closed and the device suspends. The application

Re: list vs tuple for a dict key- why aren't both hashable?

2009-11-08 Thread Mick Krippendorf
Wells wrote: I'm not quite understanding why a tuple is hashable but a list is not. The short answer has already been given. Here is the long answer: For objects p and q, p==q implies hash(p)==hash(q). It is essential for dicts and sets that objects used as keys/elements uphold this law, and

on Namespaces

2009-11-08 Thread webtourist
New bie Question: in Zen of Python - what exactly does the last one mean ? - Namespaces are one honking great idea -- let's do more of those! I mean why the emphasis ? Is it like saying put modules into packages in other programming paradigm s ? thanks --

Re: Most efficient way to pre-grow a list?

2009-11-08 Thread Emile van Sebille
On 11/7/2009 5:18 PM Carl Banks said... I think the top one is O(N log N), and I'm suspicious that it's even possible to grow a list in less than O(N log N) time without knowing the final size in advance. Citation? Quoting Tim -- Python uses mildly exponential over-allocation, sufficient

advice needed for lazy evaluation mechanism

2009-11-08 Thread markolopa
Hi, Could you please give me some advice on the piece of code I am writing? My system has several possible outputs, some of them are not always needed. I started to get confused with the code flow conditions needed to avoid doing unnecessary work. So I am trying to restructure it using lazy

fetch all tweets..

2009-11-08 Thread asit
This question is for any python-twitter developer I want to develop an application using python twitter . Just look at the code... import twitter api = twitter.Api(); sta = api.GetUserTimeline('ShashiTharoor') i = 0 for s in sta: i +=1 print str(i) ++ s.text print print

Re: list vs tuple for a dict key- why aren't both hashable?

2009-11-08 Thread Wells
On Nov 8, 2:42 pm, Mick Krippendorf mad.m...@gmx.de wrote: Wells wrote: I'm not quite understanding why a tuple is hashable but a list is not. The short answer has already been given. Here is the long answer: For objects p and q, p==q implies hash(p)==hash(q). It is essential for dicts and

Re: advice needed for lazy evaluation mechanism

2009-11-08 Thread markolopa
Hi again, I put a copy of the message and the tarball of the code here (because of the problem of line breaks): http://python-advocacy.wikidot.com/comp-lang-python-question Thanks! Marko -- http://mail.python.org/mailman/listinfo/python-list

Re: fetch all tweets..

2009-11-08 Thread Tim Chase
This question is for any python-twitter developer while I don't use python-twitter, I do use Andrew Price's Twyt for my python+twitter scripting (I started to type python+twitter scripting needs, but needs is S not the right word for anything regarding twitter). import twitter

Re: Cancelling a python thread (revisited...)

2009-11-08 Thread sven
On Nov 8, 2:50 pm, exar...@twistedmatrix.com wrote: I'm curious how this visualization works, since earlier you said something to the affect that there were no shared resources.  If you kill a thread and it had opened a window and was drawing on it, with most toolkits, you'll end up with a

Commenting and uncommenting from the shell

2009-11-08 Thread Ray Holt
Can you comment and uncomment code from the shell. I know that the format meny only shows in the edit window. I tried crtl + 3, which is what it said in the configuration window to use, and nothing happens. Also can you write executable code from the edit window. I can't see to get code that I

Re: Commenting and uncommenting from the shell

2009-11-08 Thread Chris Rebert
On Sun, Nov 8, 2009 at 3:13 PM, Ray Holt mrhol...@sbcglobal.net wrote: Can you comment and uncomment code from the shell. I know that the format meny only shows in the edit window. I tried crtl + 3, which is what it said in the configuration window to use, and nothing happens. I'm assuming by

Tax Calculator--Tkinter

2009-11-08 Thread Someone Something
I'm writing a simple tax calculator with Tkinter (just for fun). Here's my current code: from Tkinter import *; class TaxCalc: def __init__(self, root): rate=Frame(root) rate.pack() income=Frame(root)

Re: advice needed for lazy evaluation mechanism

2009-11-08 Thread MRAB
markolopa wrote: Hi again, I put a copy of the message and the tarball of the code here (because of the problem of line breaks): http://python-advocacy.wikidot.com/comp-lang-python-question Here's a slightly different approach: repository.py = class Repository(object): def

Re: Tax Calculator--Tkinter

2009-11-08 Thread MRAB
Someone Something wrote: I'm writing a simple tax calculator with Tkinter (just for fun). Here's my current code: [snip] def printResult(self): if self.nrate is None | self.nincome is None: There's no such attribute as nrate or nincome. Also, | is the bitwise

Re: smtpd and custom MAIL_FROM/RCPT_TO validation

2009-11-08 Thread Raluca Spanu
Am o întrebare, vă rugăm: De ce nu-mi trimit messages from Romania to America? :( -- http://mail.python.org/mailman/listinfo/python-list

Re: Query about doing fortran-esque repeat formatting

2009-11-08 Thread Novocastrian_Nomad
How about: print ('%s ' + '%-5.4f ' * 7) % ('text',1,2,3,4,5,6,7) -- http://mail.python.org/mailman/listinfo/python-list

String prefix question

2009-11-08 Thread Alan Harris-Reid
In the Python.org 3.1 documentation (section 20.4.6), there is a simple “Hello World” WSGI application which includes the following method... def hello_world_app(environ, start_response): status = b'200 OK' # HTTP Status headers = [(b'Content-type', b'text/plain; charset=utf-8')] # HTTP Headers

Re: String prefix question

2009-11-08 Thread Benjamin Kaplan
On Sun, Nov 8, 2009 at 9:38 PM, Alan Harris-Reid a...@baselinedata.co.uk wrote: In the Python.org 3.1 documentation (section 20.4.6), there is a simple “Hello World” WSGI application which includes the following method... def hello_world_app(environ, start_response): status = b'200 OK' # HTTP

Re: disable image loading to speed up webpage load

2009-11-08 Thread elca
Tim Roberts wrote: elca high...@gmail.com wrote: im using win32com 's webbrowser module. Win32com does not have a webbrowser module. Do you mean you are using Internet Explorer via win32com? i have some question about it.. is it possible to disable image loading to speed up webpage

Re: how to remove the same words in the paragraph

2009-11-08 Thread S.Selvam
On Wed, Nov 4, 2009 at 4:27 AM, Tim Chase python.l...@tim.thechases.comwrote: kylin wrote: I need to remove the word if it appears in the paragraph twice. could some give me some clue or some useful function in the python. Sounds like homework. To fail your class, use this one: p = one

[issue7279] decimal.py: == and != comparisons involving NaNs

2009-11-08 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: There's a second issue to consider here, which is that Python uses equality as specified by the == operator as the basic equivalence relation for set and dict membership tests. So as a general rule, an equality test between two objects of

[issue7287] import hook demo does not work

2009-11-08 Thread Baptiste Lepilleur
New submission from Baptiste Lepilleur b...@users.sourceforge.net: The import hook demo in the source directory Python-3.1.1\Demo\imputil\knee.py fails to run correctly: Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or

[issue7281] copysign() with NaN arguments on OpenSolaris

2009-11-08 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: I hope this won't be getting too complex. :) Firstly, I agree that this is perhaps not a bug at all. I reported it because I seemed possible that Python2.x had a deliberate workaround for this issue which somehow got lost in 3.x.

[issue3001] RLock's are SLOW

2009-11-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: rlock4.patch looks correct and pass test_threading.py tests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3001 ___

[issue3475] _elementtree.c import can fail silently

2009-11-08 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: For 2.5, this will not be fixed, as it is not security-critical. -- versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org

[issue3475] _elementtree.c import can fail silently

2009-11-08 Thread Fredrik Lundh
Fredrik Lundh fred...@effbot.org added the comment: Note that fail silently is a bit of a misnomer - if the embedded import doesn't work, portions of the library will fail pretty loudly. Feel free to use some variation of the suggested patch, or just wait until the next upstream release gets

[issue6233] ElementTree (py3k) doesn't properly encode characters that can't be represented in the specified encoding

2009-11-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch looks ok to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6233 ___ ___

[issue5611] Auto-detect indentation in C source in vimrc

2009-11-08 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: in r76154 for trunk and r76155 for py3k. Thanks for the help, guys! -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue7288] Detect improper leading whitespace in C files for Vim

2009-11-08 Thread Brett Cannon
New submission from Brett Cannon br...@python.org: With the proper detection for C files using either tabs or spaces now in there should also be proper highlighting when the wrong leading whitespace is used, e.g. if the file uses tabs then any lines with ^ + should be flagged as wrong.

[issue7288] Detect improper leading whitespace in C files for Vim

2009-11-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: As a non-Vim user, I don't really care, but lines beginning with spaces are valid if you want to indent by something smaller than a tab (this is common in comments). -- nosy: +pitrou ___ Python tracker

[issue7289] bad import in redemo.py script in v3.1

2009-11-08 Thread Alan Gauld
New submission from Alan Gauld alan.ga...@btinternet.com: The Tkinter import in redemo.py in Tools/Scripts folder of the 3.1 distribution uses the old spelling of Tkinter. Changing it to lower case fixes it. I've just noticed there is a 3.2 listed, I haven't checked whether it's been fixed

[issue7289] bad import in redemo.py script in v3.1

2009-11-08 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r76156. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7289

[issue1294] Management of KeyboardInterrupt in cmd.py

2009-11-08 Thread Ilya Sandler
Ilya Sandler ilya.sand...@gmail.com added the comment: Is not this patch backward incompatible? E.g any cmd-based application which expects Ctrl-C to propagate to the top level will be broken by this patch. As for pdb, I don't think pdb will benefit from this patch: as I believe that pdb needs

[issue6986] _json crash on scanner/encoder initialization error

2009-11-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: New version of my patch: * don't create file in Lib/json/tests/: add new tests in Lib/json/tests/test_speedups.py as asked by pitrou * use json.scanner.c_make_scanner and json.encoder.c_make_encoder in the test, instead of using

[issue7288] Detect improper leading whitespace in C files for Vim

2009-11-08 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Ah nuts, you're right. I guess it will only work for starting with tabs when spaces are being used for the indentation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7288

[issue6986] _json crash on scanner/encoder initialization error

2009-11-08 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file15291/json-crash-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6986 ___

[issue6986] _json crash on scanner/encoder initialization error

2009-11-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oops, you forget json-crash-2.patch, the patch was completly wrong. Check the json-crash-3.patch. -- Added file: http://bugs.python.org/file15292/json-crash-3.patch ___ Python tracker

[issue3999] Real segmentation fault handler

2009-11-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: My idea was rejected on python-dev mailing list. But I'm unable to write a patch to dump a backtrace on segfault. Anyway it would be a complelty different patch (and so a different issue). So I prefer to close this (old) issue.

[issue7274] json module apparently fails regression found at http://json.org/JSON_checker/test.zip.

2009-11-08 Thread Douglas Shawhan
Douglas Shawhan doug.shaw...@gmail.com added the comment: Fair enough. Thanks. On Fri, Nov 6, 2009 at 5:45 PM, Bob Ippolito rep...@bugs.python.org wrote: Bob Ippolito b...@redivi.com added the comment: The json module departs slightly from the spec in that it will allow you to consume and

[issue7290] Update 'how do I set a global variable' faq entry

2009-11-08 Thread R. David Murray
New submission from R. David Murray rdmur...@bitdance.com: Someone else closed issue 7276, but I was thinking of doing so but wanted to include a pointer to the relevant documentation. I'm not sure where that documentation is, but I figured there ought to be a FAQ entry for it. And there is,

[issue7290] Update 'how do I set a global variable' faq entry

2009-11-08 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: Added file: http://bugs.python.org/file15295/UnboundLocalError-faq.rst ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7290 ___

[issue7291] urllib2 cannot handle https with proxy requiring auth

2009-11-08 Thread Tatsuhiro Tsujikawa
New submission from Tatsuhiro Tsujikawa tsujik...@gp.hitachi.co.jp: urllib2 cannot handle https with proxy requiring authorization. After https_proxy is set correctly, Python 2.6.4 (r264:75706, Oct 29 2009, 15:38:25) [GCC 4.4.1] on linux2 Type help, copyright, credits or license for more

[issue7292] Multiprocessing Joinable race condition?

2009-11-08 Thread Jonathan
New submission from Jonathan jonat...@kc8onw.net: In multiprocessing.JoinableQueue when task_done is called self._unfinished_tasks.acquire(False) is called non-blocking. My program reliably crashes with the task_done() called too many times message. If I change the .acquire() call to True

[issue7291] urllib2 cannot handle https with proxy requiring auth

2009-11-08 Thread Tatsuhiro Tsujikawa
Tatsuhiro Tsujikawa tsujik...@gp.hitachi.co.jp added the comment: I created a patch. I added additional argument 'headers' to HTTPConnection::set_tunnel() method, which is a mapping of HTTP headers to sent with CONNECT method. Since authorization credential is already set to Request object, in

[issue7293] test_msvc9compiler test_reg_class failure on new Windows box

2009-11-08 Thread David Bolen
New submission from David Bolen db3l@gmail.com: This is a pretty tiny bug.. The test_reg_class test in test_msvc9compiler.py assumes that there is a Notepad registry key on Windows systems. That appears to be false until Notepad is run the very first time. I ran into this setting up a