New submission from olivier-mattelaer <[email protected]>:
Hi Everyone, I have found a strange behavior of the import command for the routine readline: The commands (put in the file test.py) is simply: import readline print readline.__doc__ If I run this programs "normally" (i.e. python2.x test.py) everything runs normally: [tmp]$ python2.7 tmp.py Importing this module enables command line editing using GNU readline. But if I launched it in the following way: python2.X test.py & It's stops before finishing the import command (so no output even if I print the output into a file). This doesn't raise any error just stop the program. I tried to add a try...except...finally... but even the finally statement is not executed. Of course, I realize that readline is not that interesting to load with that options. So I would be more than happy if you could indicate me a way to either detect that the user launch the program with '&' or a way to avoid readline to stop the program in this situations. Thanks a lot, Olivier ---------- assignee: ronaldoussoren components: Macintosh messages: 161450 nosy: olivier-mattelaer, ronaldoussoren priority: normal severity: normal status: open title: 'import readline' fails when launching with '&' type: crash versions: Python 2.6, Python 2.7 _______________________________________ Python tracker <[email protected]> <http://bugs.python.org/issue14892> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
