except ImportError:
_MacOS = None
-want_objects = 1
+wantobjects = 1
TkVersion = float(_tkinter.TK_VERSION)
TclVersion = float(_tkinter.TCL_VERSION)
if ext not in ('.py', '.pyc', '.pyo'):
baseName = baseName + ext
self.tk = _tkinter.create(screenName, baseName, className)
- self.tk.wantobjects(want_objects)
+ self.tk.wantobjects(wantobjects)
if _MacOS and hasattr(_MacOS, 'SchedParams'):
# Disable event scanning except for Command-Period
_MacOS.SchedParams(1, 0)
- _tkinter now returns Tcl objects, instead of strings. Objects which
have Python equivalents are converted to Python objects, other objects
are wrapped. This can be configured through the wantobjects method,
- or Tkinter.want_objects.
+ or Tkinter.wantobjects.
- The PyBSDDB wrapper around the Sleepycat Berkeley DB library has been
added as the package bsddb. The traditional bsddb module is still
typedef struct {
PyObject_HEAD
Tcl_Interp *interp;
- int want_objects;
+ int wantobjects;
} TkappObject;
#define Tkapp_Check(v) ((v)->ob_type == &Tkapp_Type)
static TkappObject *
Tkapp_New(char *screenName, char *baseName, char *className,
- int interactive, int want_objects)
+ int interactive, int wantobjects)
{
TkappObject *v;
char *argv0;
return NULL;
v->interp = Tcl_CreateInterp();
- v->want_objects = want_objects;
+ v->wantobjects = wantobjects;
#if defined(macintosh)
/* This seems to be needed */
ENTER_OVERLAP
if (i == TCL_ERROR)
Tkinter_Error(self);
- else if(((TkappObject*)self)->want_objects) {
+ else if(((TkappObject*)self)->wantobjects) {
Tcl_Obj *value = Tcl_GetObjResult(interp);
/* Not sure whether the IncrRef is necessary, but something
may overwrite the interpreter result while we are
Tkapp_WantObjects(PyObject *self, PyObject *args)
{
- int want_objects;
- if (!PyArg_ParseTuple(args, "i:wantobjects", &want_objects))
+ int wantobjects;
+ if (!PyArg_ParseTuple(args, "i:wantobjects", &wantobjects))
return NULL;
- ((TkappObject*)self)->want_objects = want_objects;
+ ((TkappObject*)self)->wantobjects = wantobjects;
Py_INCREF(Py_None);
return Py_None;
char *baseName = NULL;
char *className = NULL;
int interactive = 0;
- int want_objects = 0;
+ int wantobjects = 0;
baseName = strrchr(Py_GetProgramName(), '/');
if (baseName != NULL)
if (!PyArg_ParseTuple(args, "|zssi:create",
&screenName, &baseName, &className,
- &interactive, &want_objects))
+ &interactive, &wantobjects))
return NULL;
return (PyObject *) Tkapp_New(screenName, baseName, className,
- interactive, want_objects);
+ interactive, wantobjects);
}
static PyMethodDef moduleMethods[] =