[issue1073] Mysterious failure under Windows
Changes by Aki: -- severity: major status: open title: Mysterious failure under Windows versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1073> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1073] Mysterious failure under Windows
New submission from Aki: Hi, I'm not sure this is a right place to write in the problem I found. What I found was: (1) create a thread (2) open a file in the thread (3) everything works fine under Solaris (4) Openning a file in the thread fails intermittenly under Windows Not always it fails. The file is there but it returns: File "h:\prj\socgear\unidbg\tkunidbg\sub.py", line 94, in thread_worker fd = open(fn, 'rb') IOError: [Errno 2] No such file or directory: './XXX.dat' (5) The problem goes away (under Windows) if I have the main thread wait until the file is opened using Event. // The program also uses Tkinter but I'm not sure that is relevant. I cannot submit the whole program as it is too big to submit. Aki- -- nosy: +akineko __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1073> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1073] Mysterious failure under Windows
Aki added the comment: I know it is hard to believe. I spent days to try out many things. For example, I added the following: try: print os.path.isfile(fn) <<<--- fd = open(fn, 'rb') crypted = fd.read() fd.close() idx = crypted.index('\n') except (IOError, OSError, ValueError,): raise When I run, I got following cases randomly: (1) True, Open successfully (2) True, Open failed (3) False, Open failed (4) False, Open successfully The file is a binary data file and is already sitting in the directory before the execution of the program. I know that for other people it is very difficult to work on such case. But this is something to do with threading under windows. Aki- __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1073> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1073] Mysterious failure under Windows
Aki added the comment: Sorry to disappoint you but ... (1) Does the file exist before program is started, and remains after program finishes? Yes and Yes (2) Do you change the current directory (with os.chdir or similar)? No. The file is in the current directory where the program was invoked. // Probably, only way to settle this is to create a small test case. But I'm not sure if that is easy. (For example, this problem won't occur if no activity in the main thread.) Aki- __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1073> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1777530] ctypes on Solaris
Aki added the comment: Hello Thomas, Thank you for creating the patch. Unfortunately, it didn't work. (I rerun the whole installation process) You used the following to check if the os is Solaris: if sys.platform.startswith("solaris"): Under Solaris 2.x sys.platform returns "sunos5". You could use ...startswith("sunos") but things may be different under "sunos6" so I usually prefer to use sys.platform == "sunos5". After fixing this, my application with ctypes works okay. I'm happy to try out if you create another patch. Thank you, Aki- _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1777530> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1095] make install failed
New submission from Aki: I thought this was already reported but I didn't see it in the list. If this issue is already addressed, please discard. The 'make install' failed if I re-run the installation again because python-config under /usr/local/bin was already there. Removing /usr/local/lib/python2.5/lib-dynload/Python-2.5.1-py2.5.egg-info Writing /usr/local/lib/python2.5/lib-dynload/Python-2.5.1-py2.5.egg-info if test -f /usr/local/bin/python -o -h /usr/local/bin/python; \ then rm -f /usr/local/bin/python; \ else true; \ fi (cd /usr/local/bin; ln python2.5 python) (cd /usr/local/bin; ln -sf python2.5-config python-config) ln: cannot create python-config: File exists make: *** [bininstall] Error 2 I didn't see such problem under 2.4. Aki- -- components: Installation messages: 55624 nosy: akineko severity: normal status: open title: make install failed versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1095> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1095] make install failed
Aki added the comment: > Shouldn't ln -f ignore existing destination files? > What system is that? Well, it was on Solaris 9. Under Solaris, ln -sf won't clobber an existing soft link. I don't know if there is a work around of this rather than removing the link explicitly. Other Unix experts, any help? Aki- __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1095> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1777530] ctypes on Solaris
Aki added the comment: Sorry for not having done this earlier. I thought this was already closed ... I used your updated patch and installed the Python 2.5.1 from scratch. It worked without any problem except python-config issue, which I have reported in another case [issue1095]. _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1777530> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4902] failed to build ctypes in Python2.6.1 (even with gcc)
New submission from Aki : I'm trying to build Python 2.6.1 on Solaris/x86 machine but it puked. gcc -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/home/neko/gnu/Python-2.6.1/./Include -Ibuild/temp.solaris-2.10-i86pc-2.6/libffi/include -Ibuild/temp.solaris-2.10-i86pc-2.6/libffi -I/home/neko/gnu/Python-2.6.1/Modules/_ctypes/libffi/src -I. -IInclude -I./Include -I/usr/local/include -I/home/neko/gnu/Python-2.6.1/Include -I/home/neko/gnu/Python-2.6.1 -c /home/neko/gnu/Python-2.6.1/Modules/_ctypes/libffi/src/x86/sysv.S -o build/temp.solaris-2.10-i86pc-2.6/home/neko/gnu/Python-2.6.1/Modules/_ctypes/libffi/src/x86/sysv.o Assembler: "/usr/tmp/ccF9sUxS.s", line 215 : Syntax error Near line: " movl ((10 + 3) & ~3)(%eax), %esi" "/usr/tmp/ccF9sUxS.s", line 215 : Illegal character: <7e> "/usr/tmp/ccF9sUxS.s", line 216 : Syntax error Near line: " movl 10 + 3) & ~3) + 4) + 4)(%eax), %edx" "/usr/tmp/ccF9sUxS.s", line 216 : Illegal character: <7e> "/usr/tmp/ccF9sUxS.s", line 223 : Syntax error Near line: " call *(((10 + 3) & ~3) + 4)(%eax)" "/usr/tmp/ccF9sUxS.s", line 223 : Illegal character: <7e> Failed to build these modules: _ctypes_curses_curses_panel // I'm using gcc 3.4.6 and Solaris 10/x86. I try to identify the problem but I couldn't figure out what went wrong. I'm using Python 2.6.1 on Solaris/SPARC and I didn't see any problem. -- messages: 79508 nosy: akineko severity: normal status: open title: failed to build ctypes in Python2.6.1 (even with gcc) type: compile error versions: Python 2.6 ___ Python tracker <http://bugs.python.org/issue4902> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4902] failed to build ctypes in Python2.6.1 (even with gcc)
Aki added the comment: Hello Martin, Thank you for your prompt response. I recompiled the source with --save-temps. I examined the assembler source and found that it was complaining about '~'! movl 10 + 3) & ~3) + 4) + 4)(%eax), %edx ^ this one The source was compiled and assembled through 'gcc'. But I don't see gas in my machine so that I assumed it was assembled by as (Sun's assembler) and as seems not supporting '~'. I will try several things, such as installing gas to my machine. I will update when I have something to report. Thank you! Aki- ___ Python tracker <http://bugs.python.org/issue4902> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4902] failed to build ctypes in Python2.6.1 (even with gcc)
Aki added the comment: I have installed GNU binutil package to my machine to use GNU as. I re-run configure but configure somehow always found Sun as rather than GNU as even I saw GNU as first from my csh environment. I temporalily renamed Sun as so that configure was forced to use GNU as. With such brute force trick, I finally managed to build Python 2.6.1 on Solaris/x86. It would be nice if ctypes module and configure handle this elegantly and amicably, instaed of arguing that Sun as is too old-fashined. But I don't have any good idea to deal with this so I need to leave this to Python developers. ___ Python tracker <http://bugs.python.org/issue4902> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4902] failed to build ctypes in Python2.6.1 (even with gcc)
Aki added the comment: > I'm really puzzled; gcc would normally not generate assembler code like this. This is because an assembler source (sysv.S) was given. Python-2.6.1/Modules/_ctypes/libffi/src/x86/sysv.S It was created by Red Hat. A macro, RAW_CLOSURE_CIF_OFFSET, contains '~'. ___ Python tracker <http://bugs.python.org/issue4902> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5527] multiprocessing won't work with Tkinter (under Linux)
New submission from Aki : Hello, The attached test case, which uses multiprocessing module to run Tkinter GUI process, runs flawlessly under Solaris but hung under Linux (CentOS5). The test case is a trimmed version of much larger program but it still exhibits the same problem. I got a suggestion to use a function rather than a method of a class. But it didn't make any difference. I may have overlooked something but as far as I review my code, I couldn't find anything that explains why the test case won't work (In fact, it works under Solaris). -- components: Library (Lib) files: tk_test.py messages: 83867 nosy: akineko severity: normal status: open title: multiprocessing won't work with Tkinter (under Linux) type: crash versions: Python 2.6 Added file: http://bugs.python.org/file13383/tk_test.py ___ Python tracker <http://bugs.python.org/issue5527> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5527] multiprocessing won't work with Tkinter (under Linux)
Aki added the comment: Hello Jani Hakala, Thank you very much for working on the case I created. And, sorry for not getting back to you. I have confirmed observation that the problem is fixed under Linux if Tkinter is imported after fork(). However, this remains a problem for me and most other Tkinter programmers. It is fairy common to import Tkinter using from Tkinter Import *. This is because otherwise all Tk constants need to be prefixed with Tkinter. That is very painful and I don't see such coding except small examples. If I import Tkinter module after fork(), I cannot use from Tkinter *. Therefore this forces programmers to use Tkinter. prefix for every Tk constants. Is there any way to figure out the cause of this problem? Or, is there any way to do "from Tkinter import *" after fork()? Thank you for your help. Aki- -- ___ Python tracker <http://bugs.python.org/issue5527> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5527] multiprocessing won't work with Tkinter (under Linux)
Aki added the comment: Hello Jani Hakala, Thank you for your suggestions. Yes, from Tkconstants import * would ease the pain. The second suggestion, importing gui in another file didn't work well with my code as I'm using a class to host both gui process and non-gui process such that separating gui into another class will create another problem. The first suggestion worked ... almost. I needed to import a bunch of Tkinter related modules in not only gui() but also other call back methods. It solves the problem but the code became pretty messy. It would be nice if the problem is solved so that I don't need to resort to these workarounds. It is a bit frustrating as things work flawlessly under Solaris. I will play around trying to find a bit nicer workaround. Thank you! Aki- -- ___ Python tracker <http://bugs.python.org/issue5527> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17368] Python version of JSON decoder does not work with object_pairs_hook
New submission from Aki: Specifying any object_pairs_hook makes JSON decoding break when JSONObject from json/decoder.py is used. Can be emulated easily by setting c_make_scanner = None at json/scanner.py Example script: ** import json test = '{"key": "value", "empty": {}}' def hook(pairs): return dict(pairs) print(json.loads(test, object_pairs_hook=hook)) ** This test will fail because the return statement on line 166 in http://hg.python.org/cpython/file/cfc777407b03/Lib/json/decoder.py lacks "+ 1" even though the statement on line 170 has it. Basically, any empty JSON object will cause "ValueError: Extra data: [...]". -- components: Library (Lib) messages: 183600 nosy: Kuukunen priority: normal severity: normal status: open title: Python version of JSON decoder does not work with object_pairs_hook versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker <http://bugs.python.org/issue17368> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4652] IDLE does not work with Unicode
New submission from Aki Wakabayashi : I have installed python 3.0 on Ubuntu 8.10 yesterday and played around with the new unicode features and had no problems with Japanese characters(both in interactive and script mode). However, after rebooting, IDLE will no longer let me input any Japanese characters. (I have it set to UFT-8, if it makes any difference anymore) The terminal works fine. It lets me input Japanese and runs commands correctly. So I used gedit and saved a simple print("Hello(in Japanese chars)"), and run it with IDLE 3.0 but I get a blank line >>>. (Can I also make sure that I'm opening IDLE correctly? This is how I do it: 1)Open Terminal 2)~$ Python.3.0 3)>>> input idlelib.idle Thank You in advance. -- components: IDLE messages: 77717 nosy: zzyzx severity: normal status: open title: IDLE does not work with Unicode type: performance versions: Python 3.0 ___ Python tracker <http://bugs.python.org/issue4652> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print or input Unicode
Changes by Aki Sasaki : -- nosy: +escapewindow ___ Python tracker <http://bugs.python.org/issue1602> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com