Commit Graph

44 Commits

Author SHA1 Message Date
Guido van Rossum a22865ec44 Instead of printing all 9 lines of copyright info, print
"Type \"copyright\", \"credits\" or \"license\" for more information."
2000-09-05 04:41:18 +00:00
Guido van Rossum 8586991099 REMOVED all CWI, CNRI and BeOpen copyright markings.
This should match the situation in the 1.6b1 tree.
2000-09-01 23:29:29 +00:00
Guido van Rossum 0df002c45b Add three new APIs: PyRun_AnyFileEx(), PyRun_SimpleFileEx(),
PyRun_FileEx().  These are the same as their non-Ex counterparts but
have an extra argument, a flag telling them to close the file when
done.

Then this is used by Py_Main() and execfile() to close the file after
it is parsed but before it is executed.

Adding APIs seems strange given the feature freeze but it's the only
way I see to close the bug report without incompatible changes.

[ Bug #110616 ] source file stays open after parsing is done (PR#209)
2000-08-27 19:21:52 +00:00
Fredrik Lundh 620f37723f - changed 1.5 to 2.0 in the help text
(the PYTHONHOMEHELP define)

- ANSI-fication
  (patch #100794 by Peter Schneider-Kamp)
2000-07-09 20:42:34 +00:00
Guido van Rossum ffcc3813d8 Change copyright notice - 2nd try. 2000-06-30 23:58:06 +00:00
Guido van Rossum fd71b9e9d4 Change copyright notice. 2000-06-30 23:50:40 +00:00
Barry Warsaw 57e11ae847 usage_mid: Remove the description of the -X flag; it's gone now.
Py_Main(): Remove the 'X' case.
2000-05-02 19:20:26 +00:00
Guido van Rossum c15a9a1f98 Marc-Andre Lemburg:
Added -U command line option.

With the option enabled the Python compiler interprets all "..."
strings as u"..." (same with r"..." and ur"...").
2000-05-01 17:54:33 +00:00
Guido van Rossum dc8b569155 Patch from Tim Peters to repare a the problem that tracebacks are off
by a line when Python is run with -x.
1999-04-19 17:54:19 +00:00
Guido van Rossum 01b7ced834 On Windows, -i shouldn't call set[v]buf(stdin, ...) because it screws
up the _tkinter main loop.  Not clear why; the _kbhit() call _tkinter
makes probably confuses the stdio library when buffering isn't set to
whatever it is by default.
1999-02-09 18:36:51 +00:00
Guido van Rossum 6b86a42c7f Document -OO; "unsafe" optimization that removes docstrings.
Marc-Andre Lemburg.
1999-01-28 15:07:47 +00:00
Guido van Rossum 9c1201fe39 Py_Main() must be DL_EXPORT too. 1998-12-07 14:28:47 +00:00
Guido van Rossum e7adf3eb6d Documented PYTHONOPTIMIZE; by Marc Lemburg. 1998-10-07 14:50:06 +00:00
Guido van Rossum 7c33095b6b Typo in usage message. 1998-04-13 20:28:18 +00:00
Guido van Rossum bba92ca555 Add -t option to set the Py_TabcheckFlag flag. 1998-04-10 19:39:15 +00:00
Guido van Rossum 22ffac1b1f Don't use setvbuf unless HAVE_SETVBUF is defined. 1998-03-06 15:30:39 +00:00
Guido van Rossum a075ce1618 Two changes by Jeff Rush (slightly tweaked):
- New option -x, to skip first line of script

- Use the correct platform-specific delimiter and library location in
the usage message

(Also removed two blank lines and moved one line around so that each
part of the usage message is again under 512 bytes and the whole usage
message still fits in 23 lines.)
1997-12-05 21:56:45 +00:00
Guido van Rossum 873c35c437 Take out the setlocale() call. It affects atof() and will break
floating point literals.  Need to do this differently...
1997-10-31 18:25:15 +00:00
Guido van Rossum 44c36bb114 Add call to setlocale(LC_ALL, ""). 1997-10-08 22:49:17 +00:00
Guido van Rossum 3d26cc9542 Move the "import readline" to an earlier place so it is also done when
"-i" is given.  (Yes, I know, giving in to Marc Lemburg who wanted
this :-)
1997-09-16 16:11:28 +00:00
Guido van Rossum 7922bd7382 Added -X option to suppress default import of site.py. Also split the
usage message in *three* parts under 510 bytes, for low-end ANSI
compatibility.
1997-08-29 22:34:47 +00:00
Barry Warsaw 83b6709d8e Swap the sense of the -X option vis-a-vis Py_UseClassExceptionsFlag so
that class based exceptions are enabled by default.  -X disables them
in favor of the old-style string exceptions.
1997-08-29 22:20:16 +00:00
Barry Warsaw f488af3360 Parse new command line option -X which enables exception classes. 1997-08-29 21:57:49 +00:00
Guido van Rossum 9b5dbedf43 Attempt to import readline at interactive startup. 1997-08-05 21:34:14 +00:00
Guido van Rossum 5d1770ee24 Py_Cleanup() is now Py_Finalize(). 1997-08-05 02:23:48 +00:00
Guido van Rossum 05f7c50bfd Free the malloc'ed buffer that holds the command once we're done with it.
Instead of calling Py_Exit(sts), call Py_Cleanup() and return sts.
1997-08-02 03:00:42 +00:00
Guido van Rossum 534ac094f9 Removed a bunch of extern declarations of functions that are now
properly declared in Python.h.
1997-07-19 19:51:43 +00:00
Guido van Rossum ed52aacb33 This is no longer the real main program; it now defines Py_Main(), so
it can be placed in the library.

Other, related changes:

- Moved the inspection of some environment variables to
Py_Initialize().

- Got rid of -s option.

- Moved Py_GetProgramName() and related logic to pythonrun.c; call
Py_SetProgramName() instead.

- Print the version header *after* successful initialization.
1997-07-19 19:20:32 +00:00
Guido van Rossum fe4dfc7ce3 Add platform to welcome message. 1997-05-19 18:33:01 +00:00
Guido van Rossum 03ef647847 Add PYTHONHOME to the usage message. 1997-04-30 19:48:59 +00:00
Guido van Rossum b31c7dcb43 OK, I lied. On Windows, _IOLBF seems to be the same as full
buffering, so to get the normal behavior back, I set it to
unbuffered.
1997-04-11 22:19:12 +00:00
Guido van Rossum 2a212191f8 Change in when and how stdin and stdout are set to line-buffering.
This used to be done whenever stdin was interactive.  Now we only do
it when the -i flag is given.  Also (and this is the real reason for
this fix) we explicitly allocate a buffer -- this seems to be
necessary on Windows.
1997-04-11 21:57:53 +00:00
Guido van Rossum 7614da6b87 Add -O option which sets Py_OptimizeFlag to avoid emitting SET_LINENO.
Fred: sorry, I hadn't checked these changes in.  This should fix your
tracebacks!
1997-03-03 19:14:45 +00:00
Guido van Rossum 129e91aa77 Add parentheses around && within || as gcc -Wall advises. 1997-02-14 21:00:50 +00:00
Guido van Rossum 775af91911 My version of Lee Busby's patches to make '-i' pretend stdin is a tty
even if it isn't.  Changes:

- set the global flag Py_InteractiveFlag when -i is given
- call Py_FdIsInteractive() instead of isatty()
- make stdin unbuffered, too, when using -u
- make stdin and stdout line buffered, when stdin is interactive and not -u

Note that setting the environment variable PYTHONINSPECT does not have
these extra effects of -i.  (Should it?)

Unlike Lee's changes, I don't set change the prompt to go to stderr
when -i is given.
1997-02-14 19:50:32 +00:00
Guido van Rossum 3e7ae7ab17 Fix the _setmode() patch for MS_WINDOWS: include <fcntl.h> and use
fileno(std*).
1997-01-17 22:05:38 +00:00
Guido van Rossum f22d7e2c69 On Windows, -u implies binary mode for stdin/stdout
(as well as unbuffered stdout/stderr).
1997-01-11 19:28:55 +00:00
Guido van Rossum 66a7013c5c Include unistd.h to keep gcc -Wall happy. 1996-12-09 18:46:58 +00:00
Guido van Rossum a376cc5cc8 Keep gcc -Wall happy. 1996-12-05 23:43:35 +00:00
Guido van Rossum d266eb460e New permission notice, includes CNRI. 1996-10-25 14:44:06 +00:00
Guido van Rossum ac56b03f9a New style names for getprogramname and getargcargv 1996-07-21 02:33:38 +00:00
Guido van Rossum 8026febbd6 Made comment for getprogramname() more helpful. 1996-06-20 16:49:26 +00:00
Guido van Rossum 582646aecc grand renaming; added copyright to some files 1996-05-28 22:30:17 +00:00
Guido van Rossum 667d704997 Initial revision 1995-08-04 04:20:48 +00:00