[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-05-21 Thread Jason R. Coombs
Jason R. Coombs added the comment: Thanks very much for the tips Martin. I cleaned up the function per your suggestions. I also implemented islink by setting two flags in st_mode if the file is a symlink. The implementation was a little convoluted, but it might just work. The current patch d

[issue6082] os.path.sameopenfile reports that standard streams are the same

2009-05-21 Thread Ryan Leslie
Changes by Ryan Leslie : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue6082] os.path.sameopenfile reports that standard streams are the same

2009-05-21 Thread Ryan Leslie
Ryan Leslie added the comment: Thanks for the quick response, Philip. Makes even more sense now that I see: Python 2.6.1 (r261:67515, Apr 2 2009, 18:25:55) [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> open('/dev/st

[issue6057] sqlite3 error classes should be documented

2009-05-21 Thread Mitchell Model
Mitchell Model added the comment: Thanks for the informatiion about the exception classes documented in the PEP. I didn't mean to suggest that the information wasn't available. (For that matter, I was able to extract it for my purposes by looking at the .c source.) I've been writing a book o

[issue6082] os.path.sameopenfile reports that standard streams are the same

2009-05-21 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue6069] casting error from ctypes array to structure

2009-05-21 Thread higstar
higstar added the comment: Another example of this: --- import ctypes correct_data_dict = { 'Data0' : 0x, 'Data1' : 0x02, 'Data2' : 0x0AAA, } class closest_fit(ctypes.BigEndianStructure): _pack_

[issue6082] os.path.sameopenfile reports that standard streams are the same

2009-05-21 Thread Philip Jenvey
Philip Jenvey added the comment: They are the same file, namely your tty Python 2.6 (r26:66714, Oct 8 2008, 22:16:30) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os, sys >>> [os.ttyname(fp.fileno()) for fp in

[issue6082] os.path.sameopenfile reports that standard streams are the same

2009-05-21 Thread Ryan Leslie
New submission from Ryan Leslie : Python 2.6.1 (r261:67515, Apr 2 2009, 18:25:55) [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys, os >>> os.path.sameopenfile(sys.stdin.fileno(), sys.stdout.fileno()) True >>>

[issue6081] str.format_from_mapping()

2009-05-21 Thread Raymond Hettinger
New submission from Raymond Hettinger : The old % formatting allowed arbitrary mappings: >>> class Default(dict): ... def __missing__(self, key): ... return key ... >>> s = '%(name)s was born in %(country)s' >>> s % Default(name='Guido') 'Guido was born in country' But

[issue6072] unittest.TestCase._result is very likely to collide (and break) with application-defined TestCase attributes

2009-05-21 Thread Michael Foord
Michael Foord added the comment: Committed in revision 72812. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue6042] Document and slightly simplify lnotab tracing

2009-05-21 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: I've fixed #1689458. Here's a new version of the patch with the simplifying tweaks to PyCode_CheckLineNumber() so y'all can see what that looks like. If I don't get any substantive comments by the weekend (thanks Antoine for the docs +1 :), I'll assume I've lo

[issue6080] Itertools objects are missing "send"

2009-05-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: What do you have in mind for count() or repeat()? How would they use the send() value? -- ___ Python tracker ___ ___

[issue6064] Add "daemon" argument to threading.Thread constructor

2009-05-21 Thread Miki Tebeka
Miki Tebeka added the comment: I think that self.__daemonic = daemon or self._set_daemon() is wrong, need to thing about it. -- ___ Python tracker ___ __

[issue6080] Itertools objects are missing "send"

2009-05-21 Thread Miki Tebeka
Miki Tebeka added the comment: My bad, thought that every iterator is supposed to implement "send". I still think that "count" and "repeat" can support and use it. -- status: open -> closed ___ Python tracker _

[issue6080] Itertools objects are missing "send"

2009-05-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Why would they? There is no use case (the data would be thrown away). Not every iterator has to support the whole generator protocol. -- nosy: +rhettinger ___ Python tracker _

[issue6080] Itertools objects are missing "send"

2009-05-21 Thread Miki Tebeka
New submission from Miki Tebeka : Some (most?) of the itertools functions "generators" do not supprt "send". >>> from itertools import count >>> n = count(0) >>> n.next() 0 >>> n.send(1) Traceback (most recent call last): File "", line 1, in AttributeError: 'itertools.count' object has no att

[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2009-05-21 Thread Clifford W Johnson
Clifford W Johnson added the comment: Turns out the problem is really in the Sparc version of libffi -- the ffi_closure_sparc_inner_v9 function in Modules/_ctypes/libffi/src/sparc/ffi.c wasn't properly accounting for the 16-byte alignment of a long double in an argument stack -- it presumed

[issue6079] SyntaxError in xmlrpc.client examples

2009-05-21 Thread Thijs Triemstra
Thijs Triemstra added the comment: Updated ticket title since it's for multiple sections in the documentation, not just the Fault example. -- title: SyntaxError in xmlrpc.client Fault example -> SyntaxError in xmlrpc.client examples ___ Python trac

[issue6079] SyntaxError in xmlrpc.client Fault example

2009-05-21 Thread Thijs Triemstra
Thijs Triemstra added the comment: On the same documentation page for Python 3.1b1 it shows a similar error for the ProtocolError example: import xmlrpc.client # create a ServerProxy with an invalid URI proxy = xmlrpc.client.ServerProxy("http://invalidaddress/";) try: proxy.some_method()

[issue6079] SyntaxError in xmlrpc.client Fault example

2009-05-21 Thread Thijs Triemstra
New submission from Thijs Triemstra : The example is defined as: import xmlrpc.client proxy = xmlrpc.client.ServerProxy("http://localhost:8000/";) try: proxy.add(2, 5) except xmlrpc.client.Fault, err: print("A fault occurred") print("Fault code: %d" % err.faultCode) print("Fault

[issue5064] compiler.parse raises SyntaxErrors without line number information

2009-05-21 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: It seems a patch would be an enormous undertaking, as the data structure returned by the parser does not include this information, and the parser is written in C. I'll just hack around this somehow. Don't expect a patch from me. -- _

[issue4434] Embedding into a shared library fails

2009-05-21 Thread Yonas
Yonas added the comment: rb's workaround works, though. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue6075] Patch for IDLE/OS X to work with Tk-Cocoa

2009-05-21 Thread Kevin Walzer
Kevin Walzer added the comment: typo in macosxSupport.patch--fixed -- Added file: http://bugs.python.org/file14036/macosxSupport.patch ___ Python tracker ___

[issue6075] Patch for IDLE/OS X to work with Tk-Cocoa

2009-05-21 Thread Kevin Walzer
Changes by Kevin Walzer : Removed file: http://bugs.python.org/file14035/macosxSupport.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue6075] Patch for IDLE/OS X to work with Tk-Cocoa

2009-05-21 Thread Kevin Walzer
Kevin Walzer added the comment: additional refinement to help_dialog command, makes menu consistent -- Added file: http://bugs.python.org/file14035/macosxSupport.patch ___ Python tracker ___

[issue6075] Patch for IDLE/OS X to work with Tk-Cocoa

2009-05-21 Thread Kevin Walzer
Changes by Kevin Walzer : Removed file: http://bugs.python.org/file14031/macosxSupport.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue6054] tarfile normalizes arcname

2009-05-21 Thread mkv
mkv added the comment: I'm creating a debian package (.deb) for a system which uses busybox's dpkg. A deb is an ar-archive (not tar, unix ar) archive, which in turn contains two tar archives. dpkg will first extract a tar archive called control.tar.gz (or bz2) from the package, and from that tar

[issue6078] freeze.py doesn't work

2009-05-21 Thread Michael Zalokar
New submission from Michael Zalokar : I've tried this with python 2.6.0, python 2.6.1 and python 2.6.2 all with the same results. bash-3.2$ cat hello.py print "hello world" bash-3.2$ python -V Python 2.6.2 bash-3.2$ python $PYTHON_DIR/Python-2.6.2/Tools/freeze/freeze.py hello.py Name

[issue4434] Embedding into a shared library fails

2009-05-21 Thread Yonas
Yonas added the comment: Updated log file. -- Added file: http://bugs.python.org/file14034/log-main.txt ___ Python tracker ___ ___ Pyt

[issue4434] Embedding into a shared library fails

2009-05-21 Thread Yonas
Changes by Yonas : Removed file: http://bugs.python.org/file14033/log-main.txt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue4434] Embedding into a shared library fails

2009-05-21 Thread Yonas
Yonas added the comment: Here's my log file (`LD_DEBUG=all ./main`) -- Added file: http://bugs.python.org/file14033/log-main.txt ___ Python tracker ___ __

[issue4434] Embedding into a shared library fails

2009-05-21 Thread Yonas
Yonas added the comment: Same error message: import dl: ImportError: /usr/lib/python2.6/lib-dynload/dl.so: undefined symbol: PyExc_ValueError -- ___ Python tracker ___

[issue4434] Embedding into a shared library fails

2009-05-21 Thread Yonas
Yonas added the comment: Ralf, Linking against the static library (with '-Xlinker -export-dynamic') did _not_ solve the problem for me. gcc `python2.6-config --cflags` -c -fPIC mylib.c -o mylib.o -Xlinker -export-dynamic gcc -Xlinker -export-dynamic -lpthread -ldl -lutil -lm -lz -shared -Wl,-

[issue6077] Unicode issue with tempfile on Windows

2009-05-21 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt