Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14b4adb commit da8cd86Copy full SHA for da8cd86
1 file changed
Python/pythonmain.c
@@ -105,6 +105,16 @@ main(argc, argv)
105
sts = run_command(command) != 0;
106
}
107
else {
108
+ if (filename == NULL && isatty((int)fileno(fp))) {
109
+ char *startup = getenv("PYTHONSTARTUP");
110
+ if (startup != NULL && startup[0] != '\0') {
111
+ FILE *fp = fopen(startup, "r");
112
+ if (fp != NULL) {
113
+ (void) run_script(fp, startup);
114
+ err_clear();
115
+ }
116
117
118
sts = run(fp, filename == NULL ? "<stdin>" : filename) != 0;
119
120
0 commit comments