Bugs item #1069409, was opened at 2004-11-19 09:01 Message generated for change (Comment added) made by kbk You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1069409&group_id=5470
Category: IDLE Group: Python 2.4 >Status: Closed >Resolution: Rejected Priority: 5 Submitted By: PieterB (pieterb) Assigned to: Kurt B. Kaiser (kbk) Summary: C:\Python24\Lib\compileall.py returns False Initial Comment: I tried running compileall.py from IDLE with Python 2.4c1 (WinXP, SP1). I get the following 'error': .... Listing C:\WINDOWS\System32\python24.zip ... Can't list C:\WINDOWS\System32\python24.zip Listing C:\Python24 ... Listing C:\Python24\DLLs ... Listing C:\Python24\lib ... Listing C:\Python24\lib\plat-win ... Can't list C:\Python24\lib\plat-win Listing C:\Python24\lib\lib-tk ... Compiling C:\Python24\lib\lib-tk\Canvas.py ... Compiling C:\Python24\lib\lib-tk\Dialog.py ... Compiling C:\Python24\lib\lib-tk\FileDialog.py ... Compiling C:\Python24\lib\lib-tk\ScrolledText.py ... Compiling C:\Python24\lib\lib-tk\Tix.py ... Compiling C:\Python24\lib\lib-tk\Tkdnd.py ... Compiling C:\Python24\lib\lib-tk\turtle.py ... Traceback (most recent call last): File "C:\Python24\Lib\compileall.py", line 157, in -toplevel- sys.exit(exit_status) SystemExit: False >>> Shouldn't an integer value (e.g. 0) be returned by sys.exit? It's nice that you can see where the script has ended, but I think it's good to be more elaborate that everything went OK. I think some users might think it's strange to get a Traceback when everything is ok. ---------------------------------------------------------------------- >Comment By: Kurt B. Kaiser (kbk) Date: 2004-12-19 19:20 Message: Logged In: YES user_id=149084 >From compileall.py:155 : if __name__ == '__main__': exit_status = not main() sys.exit(exit_status) IDLE traps the sys.exit() because quitting IDLE is usually not what the user wants to do when it's encountered in the user's program. compileall.py is exiting with a False status, equivalent to the conventional UNIX success return of zero. You could take it up with the compileall.py maintainer, but to me it's no biggie. In any case, IDLE is working as designed. You can actually run this by $ idle -r compileall.py It will end up in the IDLE shell when finished, just close the shell :-) Works on Windows, too, but the pathnames are more complicated because IDLE isn't currently installed correctly. ---------------------------------------------------------------------- Comment By: Raymond Hettinger (rhettinger) Date: 2004-12-19 17:27 Message: Logged In: YES user_id=80475 I think this is just a fact of life when using IDLE to run scripts designed for command-line use. The script is question is fine and represents good coding style. The only question is whether IDLE should handle system exits differently. Kurt, please pronounce and close. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1069409&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com