Movatterモバイル変換


[0]ホーム

URL:


Pythonwin break execution

Alex Martellialeaxit at yahoo.com
Mon Apr 9 09:18:50 EDT 2001


"Steve Holden" <sholden at holdenweb.com> wrote in messagenews:06hA6.126963$m04.5158561 at e420r-atl1.usenetserver.com...    [snip]> An integer argumnet (usually from 0-127) is returned as the completion> status of the process under Unices, but Windozes tend to be a little less> cooperative.How so?  The old and obsolete .BAT interpreter only affords uglyways to TEST completion status (if errorlevel, bah), but the returnof completion status itself does work fine.== aa.py:import sysprint "exiting with",sys.argv[1]sys.exit(int(sys.argv[1]))== a.bat:@echo offecho Startpython aa.py %1if errorlevel 10 echo 10 or moreif errorlevel 20 echo 20 or moreif errorlevel 30 echo 30 or moreif errorlevel 40 echo 40 or moreD:\ian>a 12Startexiting with 1210 or moreD:\ian>a 31Startexiting with 3110 or more20 or more30 or moreD:\ian>Alex


More information about the Python-listmailing list

[8]ページ先頭

©2009-2025 Movatter.jp