Sybase module 0.40pre2 released

2011-12-09 Thread Robert Boehne
WHAT IS IT: The Sybase module provides a Python interface to the Sybase relational database system. It supports all of the Python Database API, version 2.0 with extensions. Please downolad, test and report any problems with the pre-release. ** This version is a pre-release not intended for

Re: subprocess.Popen under windows 7

2011-12-09 Thread Frank van den Boom
I didn't have Windows 7 right now, but that shouldn't happen with the code you've given; when trimming code for posting, you should check that the trimmed code still have the exact same problem. Here is the hole code: #!/usr/bin/env python # little script to backup recursive a folder with

Re: Multiprocessing bug, is my editor (SciTE) impeding my progress?

2011-12-09 Thread John Ladasky
Thanks once again to everyone for their recommendations, here's a follow-up. In summary, I'm still baffled. I tried ipython, as Marco Nawijn suggested. If there is some special setting which returns control to the interpreter when a subprocess crashes, I haven't found it yet. Yes, I'm RTFM.

Re: subprocess.Popen under windows 7

2011-12-09 Thread Ulrich Eckhardt
Am 08.12.2011 23:41, schrieb Frank van den Boom: arglist = [PATH_TO_7ZIP,a, -sfx, archive_name, *, -r, -p,PASSWORD] The * is resolved by the shell, this is not a wildcard that gets passed to the program. At least not normally, your case might be different. if output: print output

Re: subprocess.Popen under windows 7

2011-12-09 Thread Tim Golden
On 09/12/2011 08:32, Ulrich Eckhardt wrote: Am 08.12.2011 23:41, schrieb Frank van den Boom: arglist = [PATH_TO_7ZIP,a, -sfx, archive_name, *, -r, -p,PASSWORD] The * is resolved by the shell, this is not a wildcard that gets passed to the program. At least not normally, your case might be

Re: subprocess.Popen under windows 7

2011-12-09 Thread Frank van den Boom
Thank you very much. Now I have written a little c++ programm which produces some ouput. And now it works fine. There is something wrong with 7zip.exe and the arglist with *. Tonight I will go on and hunt the error. It should be Python 2.7 #!/usr/bin/env python PATH_TO_EXE =

Re: Misleading error message of the day

2011-12-09 Thread Jean-Michel Pichavant
Ethan Furman wrote: Jean-Michel Pichavant wrote: You have to opportunity to not use unpacking anymore :o) There is a recent thread were the dark side of unpacking was exposed. Unpacking is a cool feautre for very small applications but should be avoided whenever possible otherwise. Which

Re: I love the decorator in Python!!!

2011-12-09 Thread Robert Kern
On 12/9/11 5:02 AM, alex23 wrote: On Dec 9, 2:38 am, Chris Angelicoros...@gmail.com wrote: One piece of sophistication that I would rather like to see, but don't know how to do. Instead of *args,**kwargs, is it possible to somehow copy in the function's actual signature? I was testing this out

Re: I love the decorator in Python!!!

2011-12-09 Thread Thomas Rachel
Am 08.12.2011 12:43 schrieb Chris Angelico: On Thu, Dec 8, 2011 at 10:22 PM, K.-Michael Ayekmichael@gmail.com wrote: I am still perplexed about decorators though, am happily using Python for many years without them, but maybe i am missing something? For example in the above case, if I want

Re: Dynamic variable creation from string

2011-12-09 Thread Massi
Thank you all for your replies, first of all my Sum function was an example simplifying what I have to do in my real funciton. In general the D dictionary is complex, with a lot of keys, so I was searching for a quick method to access all the variables in it without doing the explicit creation:

Re: Dynamic variable creation from string

2011-12-09 Thread Peter Otten
Massi wrote: for k in D : exec %s = D[k] %k That seems to do the trick, but someone speaks about dirty code, can anyone point me out which problems this can generate? exec can run arbitrary code, so everybody reading the above has to go back to the definition of D to verify that it can

Re: order independent hash?

2011-12-09 Thread Steven D'Aprano
On Thu, 08 Dec 2011 10:30:01 +0100, Hrvoje Niksic wrote: In a language like Python, the difference between O(1) and O(log n) is not the primary reason why programmers use dict; they use it because it's built-in, efficient compared to alternatives, and convenient to use. If Python dict had

Re: Dynamic variable creation from string

2011-12-09 Thread Steven D'Aprano
On Fri, 09 Dec 2011 01:55:28 -0800, Massi wrote: for k in D : exec %s = D[k] %k That seems to do the trick, but someone speaks about dirty code, can anyone point me out which problems this can generate? Again, thank you for your help! Just the second-most common source of viruses, malware

Re: Dynamic variable creation from string

2011-12-09 Thread Steven D'Aprano
On Fri, 09 Dec 2011 11:59:16 +, Steven D'Aprano wrote: Just the second-most common source of viruses, malware and security vulnerabilities (behind buffer overflows): code injection attacks. Oops, I forgot to go back and revise this sentence. Code injection attacks are now the most common,

Re: Dynamic variable creation from string

2011-12-09 Thread Chris Angelico
On Fri, Dec 9, 2011 at 10:59 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: (4) If you think you can make exec safe with a prohibited list of dangerous strings, you probably can't. If you think that it's even _possible_ to make exec safe with a blacklist, I have a nice padded

Re: I love the decorator in Python!!!

2011-12-09 Thread Francesco Bochicchio
On 8 Dic, 12:22, K.-Michael Aye kmichael@gmail.com wrote: On 2011-12-08 08:59:26 +, Thomas Rachel said: Am 08.12.2011 08:18 schrieb 8 Dihedral: I use the @ decorator to behave exactly like a c macro that does have fewer side effects. I am wondering is there other

Re: tracking variable value changes

2011-12-09 Thread Andrea Crotti
On 12/08/2011 08:17 PM, Catherine Moroney wrote: Hello, Is there a way to create a C-style pointer in (pure) Python so the following code will reflect the changes to the variable a in the dictionary x? For example: a = 1.0 b = 2.0 x = {a:a, b:b} x {'a': 1.0, 'b': 2.0} a = 100.0 x

Re: Misleading error message of the day

2011-12-09 Thread Roy Smith
In article mailman.3466.1323425036.27778.python-l...@python.org, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Ethan Furman wrote: Jean-Michel Pichavant wrote: You have to opportunity to not use unpacking anymore :o) There is a recent thread were the dark side of unpacking was

Contacts/Addressbook application - any good Python ones out there?

2011-12-09 Thread tinnews
I'm after an application for managing Contacts (i.e. an Address Book) and as I suspect I will want to 'tune' it a bit Python would be my preferred language. So far I have found :- pycocuma - reasonable but rather old and a bit clunky (uses TCL/Tk) pyaddressbook - newer but very minimal

Re: Contacts/Addressbook application - any good Python ones out there?

2011-12-09 Thread Alec Taylor
Wammu? On Sat, Dec 10, 2011 at 1:41 AM, tinn...@isbd.co.uk wrote: I'm after an application for managing Contacts (i.e. an Address Book) and as I suspect I will want to 'tune' it a bit Python would be my preferred language. So far I have found :-    pycocuma - reasonable but rather old and

Re: [OT] Book authoring

2011-12-09 Thread Grant Edwards
On 2011-12-09, Miki Tebeka miki.teb...@gmail.com wrote: Greetings, Any recommendations for a book authoring system that supports the following: 1. Code examples (with syntax highlighting and line numbers) 2. Output HTML, PDF, ePub ... 3. Automatic TOC and index 4. Search (in HTML) - this is

Re: [OT] Book authoring

2011-12-09 Thread Nick Dokos
Grant Edwards invalid@invalid.invalid wrote: On 2011-12-09, Miki Tebeka miki.teb...@gmail.com wrote: Greetings, Any recommendations for a book authoring system that supports the following: 1. Code examples (with syntax highlighting and line numbers) 2. Output HTML, PDF, ePub ... 3.

Re: How to build 64-bit Python on Solaris with GCC?

2011-12-09 Thread Skip Montanaro
Karim kliateni at gmail.com writes: ./configure make make install Thanks. I have several different versions in my local sandbox. None are 64-bit ELFs. Just to make sure I hadn't missed some new development in this area, I cloned the hg repository and build the trunk version from scratch.

Re: [OT] Book authoring

2011-12-09 Thread Andrea Crotti
On 12/09/2011 03:25 AM, Miki Tebeka wrote: Greetings, Any recommendations for a book authoring system that supports the following: 1. Code examples (with syntax highlighting and line numbers) 2. Output HTML, PDF, ePub ... 3. Automatic TOC and index 4. Search (in HTML) - this is a nice to have

Re: [OT] Book authoring

2011-12-09 Thread Nick Dokos
Nick Dokos nicholas.do...@hp.com wrote: There is also orgmode, which has been used for a few books (http://orgmode.org ). I know it does HTML and PDF (the latter through latex), but I'm not sure about ePub: ISTR somebody actually did ePub for his book but I don't remember details. Avdi

Re: How to build 64-bit Python on Solaris with GCC?

2011-12-09 Thread Stefan Krah
Skip Montanaro s...@pobox.com wrote: Thanks. I have several different versions in my local sandbox. None are 64-bit ELFs. Just to make sure I hadn't missed some new development in this area, I cloned the hg repository and build the trunk version from scratch. I get a 32-bit executable on

Re: Contacts/Addressbook application - any good Python ones out there?

2011-12-09 Thread tinnews
Alec Taylor alec.tayl...@gmail.com wrote: Wammu? I hadn't really considered gammu/wammu as I saw it as a mobile phone synchrinsation tool, but I've looked a bit harder and it might very well be what I need - thank you! On Sat, Dec 10, 2011 at 1:41 AM, tinn...@isbd.co.uk wrote: I'm after an

Re: order independent hash?

2011-12-09 Thread Hrvoje Niksic
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Except for people who needed dicts with tens of millions of items. Huge tree-based dicts would be somewhat slower than today's hash-based dicts, but they would be far from unusable. Trees are often used to organize large datasets for

Execute python within Oracle

2011-12-09 Thread André Lopes
Hi all, I wrote a simple Java program to be called within an Oracle database. The goal is to execute a Python program within the DB itself, by the means of a Java program. The problem is that when I execute the procedure inside the DB, nothing happens… If I create the same Java class

Re: order independent hash?

2011-12-09 Thread Chris Angelico
On Sat, Dec 10, 2011 at 3:51 AM, Hrvoje Niksic hnik...@xemacs.org wrote: The case of dicts which require frequent access, such as those used to implement namespaces, is different, and more interesting.  Those dicts are typically quite small, and for them the difference between O(log n) and

Re: Execute python within Oracle

2011-12-09 Thread Ian Kelly
2011/12/9 André Lopes andrecras...@gmail.com: Hi all,    I wrote a simple Java program to be called within an Oracle database. The goal is to execute a Python program within the DB itself, by the means of a Java program. The problem is that when I execute the procedure inside the DB,

Re: Misleading error message of the day

2011-12-09 Thread Ethan Furman
Jean-Michel Pichavant wrote: Ethan Furman wrote: Jean-Michel Pichavant wrote: You have to opportunity to not use unpacking anymore :o) There is a recent thread were the dark side of unpacking was exposed. Unpacking is a cool feautre for very small applications but should be avoided whenever

Re: I love the decorator in Python!!!

2011-12-09 Thread 88888 Dihedral
On Thursday, December 8, 2011 7:43:12 PM UTC+8, Chris Angelico wrote: On Thu, Dec 8, 2011 at 10:22 PM, K.-Michael Aye kmicha...@gmail.com wrote: I am still perplexed about decorators though, am happily using Python for many years without them, but maybe i am missing something? For example

Buffering of sys.stdout and sys.stderr in python3 (and documentation)

2011-12-09 Thread Geoff Bache
Hi all, Short version: I'm a bit confused in general as to the changes between python2 and python3 regarding how standard output and standard error do buffering. A few things seem to have changed and I've failed to find any documentation of how and why. Also, the meaning of python -u seems to

Re: Dynamic variable creation from string

2011-12-09 Thread Ethan Furman
Massi wrote: Thank you all for your replies, first of all my Sum function was an example simplifying what I have to do in my real funciton. In general the D dictionary is complex, with a lot of keys, so I was searching for a quick method to access all the variables in it without doing the

Re: Contacts/Addressbook application - any good Python ones out there?

2011-12-09 Thread tinnews
tinn...@isbd.co.uk wrote: Alec Taylor alec.tayl...@gmail.com wrote: Wammu? I hadn't really considered gammu/wammu as I saw it as a mobile phone synchrinsation tool, but I've looked a bit harder and it might very well be what I need - thank you! Well one problem with wammu is that you

Multiprocessing bug, is information ever omitted from a traceback?

2011-12-09 Thread John Ladasky
Hi folks, A tangent off of this thread: http://groups.google.com/group/comp.lang.python/browse_frm/thread/751b7050c756c995# I'm programming in Python 2.6 on Ubuntu Linux 10.10, if it matters. I'm trying to track down a multiprocessing bug. Here's my traceback. All lines of code referenced in

Re: Python 2 or 3

2011-12-09 Thread Enrico 'Henryx' Bianchi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tobiah wrote: Use the newer version and don't look back. Interesting reply, but if I have a platform wich doesn't support Python 3 (e.g. RHEL 5.x)? ]:) Enrico P.S. note that: I *don't* want to recompile Python in production environment -BEGIN

Re: Python 2 or 3

2011-12-09 Thread Steven D'Aprano
On Sat, 10 Dec 2011 00:16:30 +0100, Enrico 'Henryx' Bianchi wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tobiah wrote: Use the newer version and don't look back. Interesting reply, but if I have a platform wich doesn't support Python 3 (e.g. RHEL 5.x)? ]:) RHEL supports

Re: I love the decorator in Python!!!

2011-12-09 Thread 88888 Dihedral
On Saturday, December 10, 2011 2:28:49 AM UTC+8, 8 Dihedral wrote: On Thursday, December 8, 2011 7:43:12 PM UTC+8, Chris Angelico wrote: On Thu, Dec 8, 2011 at 10:22 PM, K.-Michael Aye kmic...@gmail.com wrote: I am still perplexed about decorators though, am happily using Python for

Re: tracking variable value changes

2011-12-09 Thread Steven D'Aprano
On Thu, 08 Dec 2011 12:17:11 -0800, Catherine Moroney wrote: Hello, Is there a way to create a C-style pointer in (pure) Python so the following code will reflect the changes to the variable a in the dictionary x? Strictly speaking, no, but there may be a way to get something close. See

Obtaining user information

2011-12-09 Thread Tim Chase
Currently I can get the currently-logged-in-userid via getpass.getuser() which would yield something like tchase. Is there a cross-platform way to get the full username (such as from the GECOS field of /etc/passed or via something like NetUserGetInfo on Win32 so I'd get Tim Chase instead?

Re: How to build 64-bit Python on Solaris with GCC?

2011-12-09 Thread Skip Montanaro
./configure CFLAGS=-m64 LDFLAGS=-m64 should work with a reasonably recent revision. Thanks, that did, indeed work with CPython trunk. I eventually switched from gcc to Sun's compiler though because I was getting link warnings. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Buffering of sys.stdout and sys.stderr in python3 (and documentation)

2011-12-09 Thread Terry Reedy
On 12/9/2011 2:32 PM, Geoff Bache wrote: Hi all, Short version: I'm a bit confused in general as to the changes between python2 and python3 regarding how standard output and standard error do buffering. A few things seem to have changed and I've failed to find any documentation of how and why.

Re: Multiprocessing bug, is information ever omitted from a traceback?

2011-12-09 Thread Terry Reedy
On 12/9/2011 6:14 PM, John Ladasky wrote: http://groups.google.com/group/comp.lang.python/browse_frm/thread/751b7050c756c995# I'm programming in Python 2.6 on Ubuntu Linux 10.10, if it matters. It might, as many bugs have been fixed since. Can you try the same code with the most recent 2.x

How to move scrollbar by code?

2011-12-09 Thread Muddy Coder
Hi Folks, I am trying to make a listbox that will contain a looong data list, sorted, so I will be able to pre-select a data line by coding. I have done it. Say my listbox contains 1000 data lines, and my program has figured out the data line 321 is needed, so just put the cursor on data line

Re: How to move scrollbar by code?

2011-12-09 Thread Chris Angelico
On Sat, Dec 10, 2011 at 4:05 PM, Muddy Coder cosmo_gene...@yahoo.com wrote: I am trying to make a listbox that will contain a looong data list, sorted, so I will be able to pre-select a data line by coding. I have done it. Which GUI toolkit are you using? What you want is not the Python

Re: Obtaining user information

2011-12-09 Thread Cameron Simpson
On 09Dec2011 19:44, Tim Chase python.l...@tim.thechases.com wrote: | Currently I can get the currently-logged-in-userid via | getpass.getuser() which would yield something like tchase. _If_ you're on a terminal. _And_ that's exactly what you want. Personally I need to the name of geteuid() or

Re: Obtaining user information

2011-12-09 Thread Hans Mulder
On 10/12/11 02:44:48, Tim Chase wrote: Currently I can get the currently-logged-in-userid via getpass.getuser() which would yield something like tchase. Is there a cross-platform way to get the full username (such as from the GECOS field of /etc/passed or via something like NetUserGetInfo on

[issue13547] Clean Lib/_sysconfigdata.py and Modules/_testembed

2011-12-09 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: I guess this still needs to be fixed for Visual Studio. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13547 ___

[issue13560] Add PyUnicode_DecodeLocale and PyUnicode_DecodeLocaleAndSize

2011-12-09 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13560 ___ ___ Python-bugs-list

[issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris

2011-12-09 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2a2d0872d993 by Victor Stinner in branch 'default': Issue #13441: Skip some locales (e.g. cs_CZ and hu_HU) on Solaris to workaround http://hg.python.org/cpython/rev/2a2d0872d993 --

[issue12428] functools test coverage

2011-12-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Brian's patch looks ok to me. There's a missing newline (or two) just before test_main() but that can easily be fixed on commit. -- nosy: +pitrou stage: - commit review versions: +Python 3.3 -Python 3.2

[issue13550] Rewrite logging hack of the threading module

2011-12-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Tim, do you happen to know what the goal was with the threading._VERBOSE hack and the undocumented _Verbose class? -- nosy: +pitrou, tim_one ___ Python tracker rep...@bugs.python.org

[issue13563] Make use of with statement in ftplib

2011-12-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The first hunk of the patch doesn't look right: ntransfercmd() is supposed to return the connection but the with statement closes it. -- ___ Python tracker rep...@bugs.python.org

[issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris

2011-12-09 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 7ffe3d304487 by Victor Stinner in branch 'default': Issue #13441: Enable the workaround for Solaris locale bug http://hg.python.org/cpython/rev/7ffe3d304487 -- ___ Python

[issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris

2011-12-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I collected the locale list triggering the mbstowcs() bug thanks my previous commit: * hu_HU (ISO8859-2): character U+3020 * de_AT (ISO8859-1): character U+3076 * cs_CZ (ISO8859-2): character U+3020 * sk_SK

[issue4352] imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths

2011-12-09 Thread Serg Asminog
Serg Asminog akudov...@gmail.com added the comment: dirname = 'A-Za-z\xc4\xd6\xdc\xe4\xf6\xfc\xdf' Traceback (most recent call last): File D:\temp\python bug\test.py, line 19, in module file_object, file_path, description = imp.find_module(basename, [dirname]) UnicodeEncodeError: 'mbcs'

[issue4352] imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths

2011-12-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: @Serg Asminog: What is your Python version? What is your locale encoding (print(sys.getfilesystemencoding())? What is your Windows version? -- ___ Python tracker rep...@bugs.python.org

[issue13565] test_multiprocessing.test_notify_all() hangs on AMD64 Snow Leopard 02 03.x

2011-12-09 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: [333/363] test_multiprocessing Timeout (1:00:00)! Thread 0x000112d0b000: File /Users/buildbot/buildarea/3.x.parc-snowleopard-1/build/Lib/multiprocessing/connection.py, line 411 in _recv File

[issue11894] test_multiprocessing failure on AMD64 OpenIndiana 3.x: KeyError on id_to_obj[ident] in serve_client()

2011-12-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I didn't see this failure again since the issue was opened, so I close it as invalid. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org

[issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris

2011-12-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The Solaris buildbot is green, let's close it. I didn't report the bug upstream. Feel free to report it to Oracle! -- resolution: - fixed status: open - closed ___ Python tracker

[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2011-12-09 Thread sbt
New submission from sbt shibt...@gmail.com: If you pickle an array object on python 3 the typecode is encoded as a unicode string rather than as a byte string. This makes python 2 reject the pickle. # Python 3.3.0a0 (default, Dec 8 2011, 17:56:13)

[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2011-12-09 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +alexandre.vassalotti, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13566 ___ ___

[issue13505] Bytes objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2011-12-09 Thread sbt
sbt shibt...@gmail.com added the comment: sbt, the bug is not that the encoding is inefficient. The problem is we cannot unpickle bytes streams from Python 3 using Python 2. Ah. Well you can do it using codecs.encode. Python 3.3.0a0 (default, Dec 8 2011, 17:56:13) [MSC v.1500 32 bit

[issue2775] Implement PEP 3108

2011-12-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Brett, issue 2919 had a patch that merges profile/cProfile for a while now but nobody test it yet. All I need it someone to download the patch, install it, test it on some random script and tell me if it works. I don't need more. I don't

[issue13549] Incorrect nested list comprehension documentation

2011-12-09 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: In the first patch I included this example: +swapped = [] +for i in [0, 1, 2]: + ... swapped.append([row[i] for row in mat]) + ... +print swapped + [[1, 4, 7], [2, 5, 8], [3, 6, 9]] Because I applied the following

[issue13557] exec of list comprehension fails on NameError

2011-12-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This is expected and documented: http://docs.python.org/py3k/reference/executionmodel.html#interaction-with-dynamic-features Free variables are not resolved in the nearest enclosing namespace, but in the global namespace., a free

[issue4352] imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths

2011-12-09 Thread Serg Asminog
Serg Asminog akudov...@gmail.com added the comment: print(sys.getfilesystemencoding()) print(os.name) print(sys.version) print(sys.version_info) print(sys.platform) - mbcs nt 3.2.2 (default, Sep 4 2011, 09:07:29) [MSC v.1500 64 bit (AMD64)] sys.version_info(major=3, minor=2, micro=2,

[issue4352] imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths

2011-12-09 Thread Serg Asminog
Serg Asminog akudov...@gmail.com added the comment: Also Traceback (most recent call last): File D:\temp\python bug\test.py, line 20, in module file_object, file_path, description = imp.find_module(basename, [dirname]) ImportError: No module named mymodule with python 2.6.6

[issue4352] imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths

2011-12-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oops, it's not sys.getfilesystemencoding(), but locale.getpreferredencoding() which is interesting. Can you give me your locale encoding? -- ___ Python tracker rep...@bugs.python.org

[issue13557] exec of list comprehension fails on NameError

2011-12-09 Thread Stephan R.A. Deibel
Stephan R.A. Deibel sdei...@wingware.com added the comment: Ah, thanks, there it is... I thought this must be dealt with somewhere but couldn't find it. Maybe should add something to the 'exec' statement docs http://docs.python.org/py3k/library/functions.html#exec to reference this (from a

[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2011-12-09 Thread maniram maniram
maniram maniram maniandra...@gmail.com added the comment: The problem is that pickle is calling array.array(u'i',[1,2,3]) and array.array in Python 2 doesn't allow unicode strings as a typecode (typecode is the first argument) The docs in Python 2 and Py3k doesn't specify the type of the

[issue1757072] Zipfile robustness

2011-12-09 Thread James C. Ahlstrom
James C. Ahlstrom jahl...@gmail.com added the comment: Problem was reported on 2.7. I will check in detail this weekend. Please stand by. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1757072

[issue4352] imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths

2011-12-09 Thread Serg Asminog
Serg Asminog akudov...@gmail.com added the comment: cp1251 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4352 ___ ___ Python-bugs-list mailing

[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2011-12-09 Thread sbt
sbt shibt...@gmail.com added the comment: I suggest that array.array be changed in Python 2 to allow unicode strings as a typecode or that pickle detects array.array being called and fixes the call. Interestingly, py3 does understand arrays pickled by py2. This appears to be because py2

[issue12428] functools test coverage

2011-12-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Ezio and I made further minor comments that can be handled by the person doing the commit; I’d like to do it. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org

[issue13567] HTTPError interface changes / breaks depending on what was passed to constructor

2011-12-09 Thread Pami Ketolainen
New submission from Pami Ketolainen pami.ketolai...@gmail.com: In case of authentication error, HTTPError gets initialized without file object and constructor of addinfourl is not called. This means that url attribute is not set and geturl() (inherited from addinfourl) raises AttributeError.

[issue13567] HTTPError interface changes / breaks depending on what was passed to constructor

2011-12-09 Thread Pami Ketolainen
Pami Ketolainen pami.ketolai...@gmail.com added the comment: Patch adapted to 3.3 -- Added file: http://bugs.python.org/file23893/httperror-geturl-fix-3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13567

[issue3786] _curses, _curses_panel _multiprocessing can't be build in 2.6b3 w/ SunStudio 12

2011-12-09 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3786 ___ ___ Python-bugs-list mailing list

[issue13547] Clean Lib/_sysconfigdata.py and Modules/_testembed

2011-12-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: None of these two files is generated under Windows (_sysconfigdata.py by design and _testembed because nobody volunteered to do it). -- ___ Python tracker rep...@bugs.python.org

[issue1757072] Zipfile robustness

2011-12-09 Thread James C. Ahlstrom
James C. Ahlstrom jahl...@gmail.com added the comment: I grabbed a 2.7.2 zipfile.py, and my original comments stand. If there is a garbage at end of file patch, I can't find it; please provide a line number or a hint. The user at yale.edu reports that the patch works. Here is a diff of my

[issue12567] curses implementation of Unicode is wrong in Python 3

2011-12-09 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: Victor, I have these notes I wrote down when I set up the OpenIndiana buildbots. Maybe can be useful to you: (compiling from source) * ncurses 5.7: Instalación estándar ./configure --with-shared --without-normal --enable-widec

[issue12567] curses implementation of Unicode is wrong in Python 3

2011-12-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I wrote down when I set up the OpenIndiana buildbots Hum, please use the issue #13552 for curses issues on OpenIndiana/Solaris. ... de funciones: mvwchgat y wchgat See issues #3786 and #13552 for this problem. I installed

[issue13547] Clean Lib/_sysconfigdata.py and Modules/_testembed

2011-12-09 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Excellent, closing then. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13547

[issue13568] sqlite3 convert_date error with DATE type

2011-12-09 Thread Gianluigi Tiesi
New submission from Gianluigi Tiesi sher...@gmail.com: When using the 'DATE' datatype in a sqlite3 db and type converters are enabled the function in sqlite3/dbapi2.py fails I'm not sure why sqlite3 returns something like 10-JAN-11, but the function expects a ts example: import sqlite3 d =

[issue13505] Bytes objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2011-12-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: sbt, the bug is not that the encoding is inefficient. The problem is we cannot unpickle bytes streams from Python 3 using Python 2. Ah. Well you can do it using codecs.encode. Great. A bit hackish but functional and not too inefficient

[issue5905] strptime fails in non-UTF locale

2011-12-09 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 8620e6901e58 by Victor Stinner in branch '3.2': Issue #5905: time.strftime() is now using the locale encoding, instead of http://hg.python.org/cpython/rev/8620e6901e58 New changeset bee7694988a4 by Victor Stinner in

[issue5905] strptime fails in non-UTF locale

2011-12-09 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5905 ___

[issue13560] Add PyUnicode_DecodeLocale and PyUnicode_DecodeLocaleAndSize

2011-12-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I fixed issue #5905 (strptime fails in non-UTF locale). The fix is not enough if the locale is changed in Python. Update the patch to fix time.strftime() (if wcsftime() is not available). -- Added file:

[issue6699] IDLE: Warn user about overwriting a file that has a newer version on filesystem

2011-12-09 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: The patch won't apply against 3.3a0 because self.set_saved(1) became self.set_saved(True) in r70054 (da7a120c0478) After correcting this minor point, the patch works as expected. -- nosy: +serwy versions: +Python 3.3

[issue2919] Merge profile/cProfile in 3.0

2011-12-09 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2919 ___ ___ Python-bugs-list

[issue13569] multiprocessing module: Process.start() fails with EOFError: pickle.PicklingError: Can't pickle type 'thread.lock': it's not found as thread.lock

2011-12-09 Thread Nikita Pchelin
New submission from Nikita Pchelin nikita.pche...@gmail.com: I've wrote a little application that uses multiprocessing module: https://github.com/jango/PC/blob/master/pc/pc-example.py When I run it in my Linux setup, I get the expected output (Python 2.7.1+): 2011-12-09 14:16:29,014 Started

[issue13569] multiprocessing module: Process.start() fails with EOFError: pickle.PicklingError: Can't pickle type 'thread.lock': it's not found as thread.lock

2011-12-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Yes, Windows needs to pickle objects which are sent to (or returned from) a child process. Now you should wonder why you are sending a threading lock to the child. Are you sure this is deliberate? -- nosy: +pitrou versions: +Python 2.7,

[issue11886] test_time.test_tzset() fails on x86 FreeBSD 7.2 3.x: AEST timezone called EST

2011-12-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The FreeBSD 7.2 3.x buildbot is green. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11886

[issue13569] multiprocessing module: Process.start() fails with EOFError: pickle.PicklingError: Can't pickle type 'thread.lock': it's not found as thread.lock

2011-12-09 Thread Nikita Pchelin
Nikita Pchelin nikita.pche...@gmail.com added the comment: I am not sending locks explicetly (i.e. I am not using locks), but I do pass a Queue object from PC instance to _Consumer and _Producer instances that get/put values from/to the queue -- this is done deliberately. 2011/12/9 Antoine

[issue13569] multiprocessing module: Process.start() fails with EOFError: pickle.PicklingError: Can't pickle type 'thread.lock': it's not found as thread.lock

2011-12-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I am not sending locks explicetly (i.e. I am not using locks), but I do pass a Queue object from PC instance to _Consumer and _Producer instances that get/put values from/to the queue -- this is done deliberately. Is it a Queue.Queue or a

[issue13569] multiprocessing module: Process.start() fails with EOFError: pickle.PicklingError: Can't pickle type 'thread.lock': it's not found as thread.lock

2011-12-09 Thread Nikita Pchelin
Nikita Pchelin nikita.pche...@gmail.com added the comment: It's multiprocessing Queue: from multiprocessing import Process, Queue, Event -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13569

[issue13570] Expose faster unicode-ascii functions in the C-API

2011-12-09 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: I just ran the telco benchmark ... http://www.bytereef.org/mpdecimal/quickstart.html#telco-benchmark ... on _decimal to see how the PEP-393 changes affect the module. The benchmark reads numbers from a binary file, does some

[issue10364] IDLE: make .py default added extension on save

2011-12-09 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: This is a duplicate of #4832. -- nosy: +serwy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10364 ___

  1   2   >