| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
the phase 2 init of the __builtin__ module, so that multiple
interpreters will get the right exceptions.
|
|
|
|
|
| |
__module__ string and if found, print <module>.<class>, unless
<module> == "exceptions".
|
|
|
|
|
| |
a core dump when __str__() returns a non-string, and plugs a memory
leak as well: the result of PyObject_Str() was never DECREFed.
|
|
|
|
|
|
|
|
|
| |
- Changed semantics for initialized flag (again); forget the ref
counting, forget the fatal errors -- redundant calls to
Py_Initialize() or Py_Finalize() calls are simply ignored.
- Automatically import site.py on initialization, unless a flag is set
not to do this by main().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the -X command line option.
Py_Initialize(): Handle the two phase initialization of the built-in
module.
Py_Finalize(): Handle the two phase finalization of the built-in
module.
parse_syntax_error(): New function which parses syntax errors that
PyErr_Print() will catch. This correctly parses such errors
regardless of whether PyExc_SyntaxError is an old-style string
exception or new-fangled class exception.
PyErr_Print(): Many changes:
1. Normalize the exception.
2. Handle SystemExit exceptions which might be class based. Digs
the exit code out of the "code" attribute. String based
SystemExit is handled the same as before.
3. Handle SyntaxError exceptions which might be class based. Digs
the various information bits out of the instance's attributes
(see parse_syntax_error() for details). String based
SyntaxError still works too.
4. Don't write the `:' after the exception if the exception is
class based and has an empty string str() value.
|
|
|
|
| |
compares to test for SystemExit and SyntaxError.
|
| |
|
|
|
|
| |
to Py_Initialize will be undone by n calls to Py_Uninitialize.
|
|
|
|
| |
functions.
|
|
|
|
|
|
|
| |
Everything should now work again.
See the comments for the .h files mass checkin (e.g. pystate.h) for
more detail.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for more!).
- The global flags that can be set from environment variables are now
set in Py_Initialize (except the silly Py_SuppressPrint, which no
longer exists). This saves duplicate code in frozenmain.c and main.c.
- Py_GetProgramName() is now here; added Py_SetProgramName(). An
embedding program should no longer provide Py_GetProgramName(),
instead it should call Py_SetProgramName() *before* calling
Py_Initialize().
|
| |
|
|
|
|
| |
instead of calling PyErr_Clear(). Add checking of those errors.
|
| |
|
|
|
|
| |
symbols is needed, define these in Python.h with a Py_ prefix.
|
|
|
|
| |
not to use kill().
|
|
|
|
|
| |
All per-thread globals are moved into a struct which is manipulated
separately.
|
|
|
|
| |
Print correct name in fatal error from PyErr_Print.
|
|
|
|
| |
it anyway.
|
|
|
|
|
|
|
| |
Py_FdIsInteractive(). The flag is supposed to be set by the -i
command line option. The function is supposed to be called instead of
isatty(). This is used for Lee Busby's wish #1, to have an option
that pretends stdin is interactive even when it really isn't.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- Assume files of types 'PYC ' and 'APPL' are compiled python code
- For mwerks, show status line when program has terminated while
keeping window open.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
bltinmodule.c: fixed coerce() nightmare in ternary pow().
modsupport.c (initmodule2): pass METH_FREENAME flag to newmethodobject().
pythonrun.c: move flushline() into and around print_error().
|
|
|
|
|
|
| |
err_fetch/err_restore and so on). But...
NOTE: import.c has been rewritten and all the DL stuff is now in the
new file importdl.c.
|
| |
|
| |
|
|
|
|
| |
multi-line source line
|
|
|
|
|
|
| |
mac/macsetfiletype.c: changes by Jack to execute .pyc file passed
as command line argument. On the Mac .pyc files are given a
special type so they can be double-clicked
|
| |
|
|
|
|
|
|
| |
the exception returned by a syntax error (when reported) would
contain an object with refcnt zero!
MPW changes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* posixmodule.c: don't prototype getcwd() -- it's not portable...
* mappingobject.c: double-check validity of last_name_char in
dict{lookup,insert,remove}.
* arraymodule.c: need memmove only for non-STDC Suns.
* Makefile: comment out HTML_LIBS and XT_USE by default
* pythonmain.c: don't prototype getopt() -- it's not standardized
* socketmodule.c: cast flags arg to {get,set}sockopt() and addrbuf arg to
recvfrom() to (ANY*).
* pythonrun.c (initsigs): fix prototype, make it static
* intobject.c (LONG_BIT): only #define it if not already defined
* classobject.[ch]: remove all references to unused instance_convert()
* mappingobject.c (getmappingsize): Don't return NULL in int function.
|