[issue6077] Unicode issue with tempfile on Windows
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4434] Embedding into a shared library fails
Yonas yona...@gmail.com 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,-soname,mylib.so -o mylib.so mylib.o /usr/lib/python2.6/config/libpython2.6.a gcc `python2.6-config --cflags` -Xlinker -export-dynamic -ldl -lutil -lm -lz -o main main.c /usr/lib/python2.6/config/libpython2.6.a -- `python2.6-config --cflags` returns -I/usr/include/python2.6 -I/usr/include/python2.6 -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes Ubuntu Jaunty Linux yonas-laptop 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux -- nosy: +yonas ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4434] Embedding into a shared library fails
Yonas yona...@gmail.com added the comment: Same error message: import dl: ImportError: /usr/lib/python2.6/lib-dynload/dl.so: undefined symbol: PyExc_ValueError -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4434] Embedding into a shared library fails
Yonas yona...@gmail.com added the comment: Here's my log file (`LD_DEBUG=all ./main`) -- Added file: http://bugs.python.org/file14033/log-main.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4434] Embedding into a shared library fails
Changes by Yonas yona...@gmail.com: Removed file: http://bugs.python.org/file14033/log-main.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4434] Embedding into a shared library fails
Yonas yona...@gmail.com added the comment: Updated log file. -- Added file: http://bugs.python.org/file14034/log-main.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6078] freeze.py doesn't work
New submission from Michael Zalokar zalo...@fnal.gov: 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 File m BaseHTTPServer /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/BaseHTTPServer.py m FixTk /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/lib-tk/FixTk.py m SocketServer /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/SocketServer.py m StringIO /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/StringIO.py m Tkconstants /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/lib-tk/Tkconstants.py m Tkinter /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/lib-tk/Tkinter.py m UserDict /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/UserDict.py m __builtin__ m __future__ /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/__future__.py m __main__ hello.py m _abcoll /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/_abcoll.py m _bisect /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/lib-dynload/_bisect.so m _codecs m _collections /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/lib-dynload/_collections.so m _ctypes /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/lib-dynload/_ctypes.so m _functools /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/lib-dynload/_functools.so m _heapq /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/lib-dynload/_heapq.so m _locale /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/lib-dynload/_locale.so m _random m _socket m _sre m _ssl /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/lib-dynload/_ssl.so m _struct m _threading_local /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/_threading_local.py m _tkinter m _warnings m abc /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/abc.py m array m base64 /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/base64.py m bdb /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/bdb.py m binascii /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/lib-dynload/binascii.so m bisect /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/bisect.py m cPickle m cStringIO m cmd /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/cmd.py m codecs /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/codecs.py m collections /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/collections.py m copy /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/copy.py m copy_reg /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/copy_reg.py P ctypes /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/ctypes/__init__.py m ctypes._endian /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/ctypes/_endian.py P ctypes.macholib /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/ctypes/macholib/__init__.py m ctypes.macholib.dyld /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/ctypes/macholib/dyld.py m ctypes.macholib.dylib /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/ctypes/macholib/dylib.py m ctypes.macholib.framework /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/ctypes/macholib/framework.py m ctypes.util /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/ctypes/util.py m difflib /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/difflib.py m dis /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/dis.py P distutils /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/distutils/__init__.py m distutils.dep_util /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/distutils/dep_util.py m distutils.errors /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/distutils/errors.py m distutils.log /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/distutils/log.py m distutils.spawn /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/distutils/spawn.py m distutils.sysconfig /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/distutils/sysconfig.py m distutils.text_file /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/distutils/text_file.py m distutils.util /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/distutils/util.py m doctest /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/doctest.py m dummy_thread /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/dummy_thread.py m dummy_threading /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/dummy_threading.py P email /fnal/ups/prd/python/v2_6_2_E_0/lib/python2.6/email/__init__.py m email._parseaddr
[issue6075] Patch for IDLE/OS X to work with Tk-Cocoa
Changes by Kevin Walzer wordt...@users.sourceforge.net: Removed file: http://bugs.python.org/file14031/macosxSupport.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6075 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6075] Patch for IDLE/OS X to work with Tk-Cocoa
Kevin Walzer wordt...@users.sourceforge.net added the comment: additional refinement to help_dialog command, makes menu consistent -- Added file: http://bugs.python.org/file14035/macosxSupport.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6075 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6075] Patch for IDLE/OS X to work with Tk-Cocoa
Changes by Kevin Walzer wordt...@users.sourceforge.net: Removed file: http://bugs.python.org/file14035/macosxSupport.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6075 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6075] Patch for IDLE/OS X to work with Tk-Cocoa
Kevin Walzer wordt...@users.sourceforge.net added the comment: typo in macosxSupport.patch--fixed -- Added file: http://bugs.python.org/file14036/macosxSupport.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6075 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4434] Embedding into a shared library fails
Yonas yona...@gmail.com added the comment: rb's workaround works, though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5064] compiler.parse raises SyntaxErrors without line number information
Jean-Paul Calderone exar...@divmod.com 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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5064 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6079] SyntaxError in xmlrpc.client Fault example
New submission from Thijs Triemstra li...@collab.nl: 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 string: %s % err.faultString) Which throws the following error: File test.py, line 6 except xmlrpc.client.Fault, err: ^ SyntaxError: invalid syntax I think it should be defined instead as: import xmlrpc.client proxy = xmlrpc.client.ServerProxy(http://localhost:8000/;) try: proxy.add(2, 5) except xmlrpc.client.Fault as err: print(A fault occurred) print(Fault code: %d % err.faultCode) print(Fault string: %s % err.faultString) -- assignee: georg.brandl components: Documentation messages: 88162 nosy: georg.brandl, thijs severity: normal status: open title: SyntaxError in xmlrpc.client Fault example type: compile error versions: Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6079 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6079] SyntaxError in xmlrpc.client Fault example
Thijs Triemstra li...@collab.nl 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() except xmlrpc.client.ProtocolError, err: print(A protocol error occurred) print(URL: %s % err.url) print(HTTP/HTTPS headers: %s % err.headers) print(Error code: %d % err.errcode) print(Error message: %s % err.errmsg) Throws this error: File proto.py, line 8 except xmlrpc.client.ProtocolError, err: ^ SyntaxError: invalid syntax Which should be fixed with: import xmlrpc.client # create a ServerProxy with an invalid URI proxy = xmlrpc.client.ServerProxy(http://invalidaddress/;) try: proxy.some_method() except xmlrpc.client.ProtocolError as err: print(A protocol error occurred) print(URL: %s % err.url) print(HTTP/HTTPS headers: %s % err.headers) print(Error code: %d % err.errcode) print(Error message: %s % err.errmsg) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6079 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6079] SyntaxError in xmlrpc.client examples
Thijs Triemstra li...@collab.nl 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 tracker rep...@bugs.python.org http://bugs.python.org/issue6079 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]
Clifford W Johnson cliff...@ieee.org 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 8-byte alignment throwing off any long double value after a shorter value. (16-byte alignment is specified in the SPARC Compliance Definition.) I've attached a patch which I'm sure could be improved (there's probably a more proper way to do things in libffi) but it passes the check tests for ctypes and a few other tests I threw in. By the way, I noticed that one of the test cases in the script I added in my last comment has an error in its success/failure test ... the (typ, c_byte) test should check for the result of -3 instead of 3.14. -- keywords: +patch Added file: http://bugs.python.org/file14037/sparc_longdouble.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6029 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6080] Itertools objects are missing send
New submission from Miki Tebeka miki.teb...@gmail.com: 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 stdin, line 1, in module AttributeError: 'itertools.count' object has no attribute 'send' However: def count(start): ... while 1: ... yield start ... start += 1 ... n = count(0) n.next() 0 n.send(1) 1 For some of the functions (such as count and repeat), send also make sense. -- components: Library (Lib) messages: 88166 nosy: tebeka severity: normal status: open title: Itertools objects are missing send versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6080] Itertools objects are missing send
Raymond Hettinger rhettin...@users.sourceforge.net 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 rep...@bugs.python.org http://bugs.python.org/issue6080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6080] Itertools objects are missing send
Miki Tebeka miki.teb...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue6080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6064] Add daemon argument to threading.Thread constructor
Miki Tebeka miki.teb...@gmail.com added the comment: I think that self.__daemonic = daemon or self._set_daemon() is wrong, need to thing about it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6064 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6080] Itertools objects are missing send
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: What do you have in mind for count() or repeat()? How would they use the send() value? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6042] Document and slightly simplify lnotab tracing
Jeffrey Yasskin jyass...@gmail.com 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 looked at this code longer than anyone in the last 7 years and commit it. :) -- Added file: http://bugs.python.org/file14038/lnotab.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6072] unittest.TestCase._result is very likely to collide (and break) with application-defined TestCase attributes
Michael Foord mich...@voidspace.org.uk added the comment: Committed in revision 72812. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6072 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6081] str.format_from_mapping()
New submission from Raymond Hettinger rhettin...@users.sourceforge.net: 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 the new str.format() demands mappings be first converted to a regular dict using **kwargs, so something like the above is not possible. s = '{name} was born in {country}' s.format(**Default(name='Guido')) Traceback (most recent call last): File pyshell#27, line 1, in module s.format(**Default(name='Guido')) KeyError: 'country' There is a work-around using string.vformat() but it is obscure and awkward: import string string.Formatter().vformat(s, (), Default(name='Guido')) 'Guido was born in country' Instead, it would be better to offer an alternate method: s.format_from_mapping(Default(name='Guido')) 'Guido was born in country' -- messages: 88173 nosy: rhettinger severity: normal status: open title: str.format_from_mapping() type: feature request versions: Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6082] os.path.sameopenfile reports that standard streams are the same
New submission from Ryan Leslie ryle...@gmail.com: 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 os.path.sameopenfile(sys.stdout.fileno(), sys.stderr.fileno()) True null = open(os.devnull) os.path.sameopenfile(sys.stdin.fileno(), null.fileno()) False # That worked. -- components: Library (Lib) messages: 88174 nosy: ryles severity: normal status: open title: os.path.sameopenfile reports that standard streams are the same type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6082] os.path.sameopenfile reports that standard streams are the same
Philip Jenvey pjen...@users.sourceforge.net 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 sys.stdin, sys.stdout, sys.stderr] ['/dev/ttys002', '/dev/ttys002', '/dev/ttys002'] -- nosy: +pjenvey ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6069] casting error from ctypes array to structure
higstar adr...@higstar.com added the comment: Another example of this: --- import ctypes correct_data_dict = { 'Data0' : 0x, 'Data1' : 0x02, 'Data2' : 0x0AAA, } class closest_fit(ctypes.BigEndianStructure): _pack_ = 1# aligned to 8 bits, not ctypes default of 32 _fields_= [ (Data0, ctypes.c_uint32, 32), (Data1, ctypes.c_uint8, 3), (Data2, ctypes.c_uint16, 12), ] class closest_fit_min_16(ctypes.BigEndianStructure): _pack_ = 1# aligned to 8 bits, not ctypes default of 32 _fields_= [ (Data0, ctypes.c_uint32, 32), (Data1, ctypes.c_uint16, 3), (Data2, ctypes.c_uint16, 12), ] class closest_fit_min_32(ctypes.BigEndianStructure): _pack_ = 1# aligned to 8 bits, not ctypes default of 32 _fields_= [ (Data0, ctypes.c_uint32, 32), (Data1, ctypes.c_uint32, 3), (Data2, ctypes.c_uint32, 12), ] class uint32(ctypes.BigEndianStructure): _pack_ = 1# aligned to 8 bits, not ctypes default of 32 _fields_= [ (Data0, ctypes.c_uint32, 32), (Data1, ctypes.c_uint32, 3), (Data2, ctypes.c_uint32, 12), ] class uint64(ctypes.BigEndianStructure): _pack_ = 1# aligned to 8 bits, not ctypes default of 32 _fields_= [ (Data0, ctypes.c_uint64, 32), (Data1, ctypes.c_uint64, 3), (Data2, ctypes.c_uint64, 12), ] size_of_structures_in_bytes = 6 def castbytes(type): buffer = (ctypes.c_byte * size_of_structures_in_bytes)() for index in range(size_of_structures_in_bytes): buffer[index] = 0x55 return ctypes.cast(ctypes.pointer(buffer), ctypes.POINTER(type)).contents def print_members(test): print(Data0 is 0x%X, Data1 is 0x%X, Data2 is 0x%X for %s%(test.Data0, test.Data1, test.Data2, test.__class__.__name__)) test_classes = [closest_fit, uint32, closest_fit_min_16, closest_fit_min_32, uint64] Test_Failed = False tests = [castbytes(type) for type in test_classes] for test in tests: #print_members(test) for data in correct_data_dict: if not test.__getattribute__(data) == correct_data_dict[data]: Test_Failed = True print(%s failed for %s, value was 0x%X but should have been 0x%X%(data, test.__class__.__name__, test.__getattribute__(data), correct_data_dict[data])) if not Test_Failed: print(Passed) --- c:\python25\python.exe IssueNEW.py Data2 failed for closest_fit, value was 0x550 but should have been 0xAAA c:\python26\python.exe IssueNEW.py Data2 failed for closest_fit, value was 0x550 but should have been 0xAAA c:\python30\python.exe IssueNEW.py Data2 failed for closest_fit, value was 0x550 but should have been 0xAAA -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6069 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6082] os.path.sameopenfile reports that standard streams are the same
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6057] sqlite3 error classes should be documented
Mitchell Model m...@acm.org 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 on Bioinformatics Programming Using Python for O'Reilly and working my way through the documentation for the many modules I describe in detail paying far more attention to accuracy, completeness, etc. than would normally concern me. In the process I have submitted many observations about inaccuracies, inconsistencies, gaps, etc. in the library documentation. In effect I am doing a review and picking up problems in a module documentation that could easily go unnoticed by anyone familiar with the modules. A small portion have involved incomplete transitions from Python 2 to Python 3. (My book uses 3; anyone involved in module documentation should take my comments as QA observations about Python 3 documentation and decid e what, if anything, to do about them.) My concern is for non-developer Python programmers who expect module documentation to be self-contained except, perhaps, where there are pointers to major outside resources (for instance, sqlite.org documentation). I don't think we can ask or expect normal Python programmers to know what a PEP is, how to access it, what relationship a PEP has to the module as implemented, etc. True, for the particular case of the DB API interface the PEP document is more important than most becuase it defines an interface that other modules implement. In this case, perhaps the best approach would be to document the DB-API as part of the ordinary Python library documentation, then have sqlite3 be a subtopic of that. However it's done I think user's should be able to read the standard documentation and find what they need. An incidental reason is that people sometimes work offline and don't have access to the PEPs though they do have access to the installed documentation. All those arguments aside, perhaps what makes the most sense is to simply add the error hierarchy following This is the exception inheritance layout: to the sqlite documentation, while still referring the reader to the PEP. I am just really wary of having PEPs serve as documentation for ordinary Python programmers. Even many PEPs that have been accepted and implemented have more interest as background and explanation than practical documentation, snce the documentation of their contribution to the language and the library has been integrated into the regular documentation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6057 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6082] os.path.sameopenfile reports that standard streams are the same
Ryan Leslie ryle...@gmail.com 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/stdout').readline() hello 'hello\n' open('/dev/stdin').readline() hello 'hello\n' -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6082] os.path.sameopenfile reports that standard streams are the same
Changes by Ryan Leslie ryle...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows
Jason R. Coombs jar...@jaraco.com 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 does compile for me with just a few compiler warnings, which I hope can be easily shaken out. ..\..\Modules\posixmodule.c(4794) : warning C4013: 'CreateSymbolicLink' undefined; assuming extern returning int ..\..\Modules\posixmodule.c(4803) : warning C4133: 'function' : incompatible types - from 'PyObject *' to 'char *' ..\..\Modules\posixmodule.c(7174) : warning C4113: 'PyObject *(__cdecl *)(PyObject *,PyObject *,PyObject *)' differs in parameter lists from 'PyCFunction' The first warning might be a problem. I understand from the docs (http://msdn.microsoft.com/en-us/library/aa363866.aspx) that all I need to do is include windows.h, which is already included... but still the function prototype isn't present. This might be because a preprocessor declaration of WINVER isn't set high enough... but since the same executable is built for all versions of Windows, how is this reconciled in the compiler? -- Added file: http://bugs.python.org/file14039/windows symlink draft 2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1578269 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com