mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Support for frozen scripts; added -i option.
This commit is contained in:
parent
41ffccbba7
commit
f56e3db1dd
6 changed files with 150 additions and 5 deletions
|
@ -82,6 +82,8 @@ char version[80];
|
|||
|
||||
char *argv0; /* For dynamic loading in import.c */
|
||||
|
||||
extern char verbose;
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
initargs(p_argc, p_argv)
|
||||
|
@ -98,7 +100,11 @@ initargs(p_argc, p_argv)
|
|||
#endif
|
||||
wargs(p_argc, p_argv);
|
||||
#endif /* USE_STDWIN */
|
||||
if (*p_argc < 2 && isatty(0) && isatty(1))
|
||||
#ifdef USE_FROZEN
|
||||
if (verbose)
|
||||
#else
|
||||
if (verbose || *p_argc < 2 && isatty(0) && isatty(1))
|
||||
#endif
|
||||
{
|
||||
printf("Python %s.\n", version);
|
||||
printf(
|
||||
|
@ -448,3 +454,15 @@ struct {
|
|||
|
||||
{0, 0} /* Sentinel */
|
||||
};
|
||||
|
||||
#ifdef USE_FROZEN
|
||||
#include "frozen.c"
|
||||
#else
|
||||
struct frozen {
|
||||
char *name;
|
||||
char *code;
|
||||
int size;
|
||||
} frozen_modules[] = {
|
||||
{0, 0, 0}
|
||||
};
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue