Commit Graph

84 Commits

Author SHA1 Message Date
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