Author olivier-mattelaer
Recipients olivier-mattelaer, ronaldoussoren
Date 2012-05-23.18:55:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hi Everyone, 

I have found a strange behavior of the import command for the routine readline:

The commands (put in the file is simply:
import readline
print readline.__doc__

If I run this programs "normally" (i.e. python2.x everything runs normally:
[tmp]$ python2.7 
Importing this module enables command line editing using GNU readline.

But if I launched it in the following way:
python2.X &
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,

Date User Action Args
2012-05-23 18:55:19olivier-mattelaersetrecipients: + olivier-mattelaer, ronaldoussoren
2012-05-23 18:55:19olivier-mattelaersetmessageid: <>
2012-05-23 18:55:18olivier-mattelaerlinkissue14892 messages
2012-05-23 18:55:18olivier-mattelaercreate