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
Guido van Rossum
582acece2e
Trent Mick's Win64 changes: size_t vs. int or long; also some overflow
...
tests.
2000-06-28 22:07:35 +00:00
Mark Hammond
440d898230
Added a new debug method sys.gettotalrefcount(), which returns the total number of references on all Python objects. This is only enabled when Py_TRACE_REFS is defined (which includes default debug builds under Windows).
...
Also removed a redundant cast from sys.getrefcount(), as discussed on the patches list.
2000-06-20 08:12:48 +00:00
Marc-André Lemburg
99964b86b2
Marc-Andre Lemburg <mal@lemburg.com>:
...
Changed the API names for setting the default encoding.
These are now in line with the other hooks API names
(no underscores).
2000-06-07 09:13:41 +00:00
Fred Drake
8b4d01d9f9
M.-A. Lemburg <mal@lemburg.com>:
...
Added APIs to allow setting and querying the system's
current string encoding: sys.set_string_encoding()
and sys.get_string_encoding().
2000-05-09 19:57:01 +00:00
Fred Drake
6d27c1eb32
Simplify creation of the version_info value for clarity, per
...
suggestion from Greg Stein.
2000-04-13 20:03:20 +00:00
Fred Drake
93a20bf87c
Capitulate, changing version_info to a 5-tuple:
...
major, minor, micro, level, serial
Values are now monotonically increasing with each new release.
2000-04-13 17:44:51 +00:00
Fred Drake
801c08d700
Define version_info to be a tuple (major, minor, micro, level); level
...
is a string "a2", "b1", "c1", or '' for a final release.
Added version_info and hexversion to the module docstring.
2000-04-13 15:29:10 +00:00
Guido van Rossum
ffc0f4fb36
Use modern PyArg_ParseTuple style, with function names.
...
(Mostly.)
2000-03-31 00:38:29 +00:00
Guido van Rossum
43713e5a28
Massive patch by Skip Montanaro to add ":name" to as many
...
PyArg_ParseTuple() format string arguments as possible.
2000-02-29 13:59:29 +00:00
Guido van Rossum
be2033697f
In PySys_GetObject(), it's possible that tstate->interp->sysdict is
...
NULL. In that case, return NULL rather than dumping core.
This fixes PR#91, submitted by Lele Gaifax.
1999-10-05 22:17:41 +00:00
Barry Warsaw
54892c4b2c
_PySys_Init(): Nailed small memory leak. The stringobject created for
...
sys.version was missing a Py_XDECREF().
1999-01-27 16:33:19 +00:00
Guido van Rossum
a71b5f4e1d
Jim Ahlstrom patch: the module doc string is too long for 16-bit VC
...
1.5. Omit the second part.
1999-01-14 19:07:00 +00:00
Guido van Rossum
e0d7dae3b8
Add sys.hexversion, which is an integer encoding the version in hexadecimal.
...
In other words, hex(sys.hexversion) == 0x010502b2 for Python 1.5.2b2.
This is derived from the new variable PY_VERSION_HEX defined in patchlevel.h.
(Cute, eh?)
1999-01-03 12:55:39 +00:00
Guido van Rossum
8442af35fe
Patches for mywrite() by Marc Lemburg: save/restore the error state
...
reliably; check return value of vsprintf().
1998-10-12 18:22:10 +00:00
Guido van Rossum
40552d0857
Gack. The module doc string is too long for VC++ 5.0.
...
However two string literals concatenated are fine!
Hope this doesn't break other platforms.
1998-08-06 03:34:39 +00:00
Guido van Rossum
c3bc31e249
Added doc strings. Maybe the doc string for the module itself is a bit
...
long, but it sure helps!
1998-06-27 19:43:25 +00:00
Guido van Rossum
a890e68807
New APIs to write to sys.stdout or sys.stderr using a printf-like interface.
...
Adapted from code submitted by Just van Rossum.
PySys_WriteStdout(format, ...)
PySys_WriteStderr(format, ...)
The first function writes to sys.stdout; the second to sys.stderr. When
there is a problem, they write to the real (C level) stdout or stderr;
no exceptions are raised (but a pending exception may be cleared when a
new exception is caught).
Both take a printf-style format string as their first argument followed
by a variable length argument list determined by the format string.
*** WARNING ***
The format should limit the total size of the formatted output string to
1000 bytes. In particular, this means that no unrestricted "%s" formats
should occur; these should be limited using "%.<N>s where <N> is a
decimal number calculated so that <N> plus the maximum size of other
formatted text does not exceed 1000 bytes. Also watch out for "%f",
which can print hundreds of digits for very large numbers.
1998-05-12 14:59:24 +00:00
Guido van Rossum
bd36dbaaa5
Make backup copies of stdin, stdout, stderr as __stdin__, __stdout__,
...
__stderr__. These will be used by the import cleanup.
1998-02-19 20:53:06 +00:00
Guido van Rossum
25c649fdf2
Get rid of another reference to _PyImport_Inittab (now a static array)
...
that should be PyImport_Inittab (a new pointer initialized to point to
the array).
1997-11-04 17:04:34 +00:00
Guido van Rossum
6c1e5f2033
Get DLL version from a variable.
1997-09-29 23:34:23 +00:00
Guido van Rossum
622f73f188
Remove unised variable
1997-08-07 19:22:48 +00:00
Guido van Rossum
25ce566661
The last of the mass checkins for separate (sub)interpreters.
...
Everything should now work again.
See the comments for the .h files mass checkin (e.g. pystate.h) for
more detail.
1997-08-02 03:10:38 +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