diff -r fcdb35b114ab PC/launcher.c --- a/PC/launcher.c Fri Jan 25 10:13:57 2013 +0200 +++ b/PC/launcher.c Fri Jan 25 11:55:02 2013 +0100 @@ -1295,13 +1295,6 @@ else { p = argv[1]; plen = wcslen(p); - if (p[0] != L'-') { - read_commands(); - maybe_handle_shebang(&argv[1], command); - } - /* No file with shebang, or an unrecognised shebang. - * Is the first arg a special version qualifier? - */ valid = (*p == L'-') && validate_version(&p[1]); if (valid) { ip = locate_python(&p[1]); @@ -1310,6 +1303,15 @@ installed", &p[1]); command += wcslen(p); command = skip_whitespace(command); + } else { + int index; + for (index = 1; index < argc; ++index) + if (*argv[index] != L'-') + break; + if (index < argc-1) { + read_commands(); + maybe_handle_shebang(&argv[index], command); + } } } if (!valid) { @@ -1329,7 +1331,7 @@ fwprintf(stdout, L"\ Python Launcher for Windows Version %s\n\n", version_text); fwprintf(stdout, L"\ -usage: %s [ launcher-arguments ] script [ script-arguments ]\n\n", argv[0]); +usage: %s [ launcher-arguments ] [ python-arguments ] script [ script-arguments ]\n\n", argv[0]); fputws(L"\ Launcher arguments:\n\n\ -2 : Launch the latest Python 2.x version\n\ @@ -1362,4 +1364,4 @@ return process(argc, argv); } -#endif \ No newline at end of file +#endif

AltStyle によって変換されたページ (->オリジナル) /