[Scipy-svn] r2713 - trunk/Lib/sandbox/timeseries/io/fame/src
scipy-svn at scipy.org
scipy-svn at scipy.org
Thu Feb 15 13:35:08 EST 2007
Author: mattknox_ca
Date: 2007-02-15 12:35:05 -0600 (Thu, 15 Feb 2007)
New Revision: 2713
Modified:
trunk/Lib/sandbox/timeseries/io/fame/src/cfame.c
Log:
- added set_option function as a wrapper to cfmsopt
- removed large option to open function (use set_option independently to control this behaviour)
Modified: trunk/Lib/sandbox/timeseries/io/fame/src/cfame.c
===================================================================
--- trunk/Lib/sandbox/timeseries/io/fame/src/cfame.c 2007-02-15 17:52:27 UTC (rev 2712)
+++ trunk/Lib/sandbox/timeseries/io/fame/src/cfame.c 2007-02-15 18:35:05 UTC (rev 2713)
@@ -65,23 +65,34 @@
cfmsdm(&status, D_NC, D_ND, D_NA, dmistt); //Date
return 0;
}
-///////////////////////////////////////////////////////////////////////
+static char cfame_set_option_doc[] = "wrapper to cfmsopt";
+static PyObject *
+cfame_set_option(PyObject *self, PyObject *args)
+{
+ int status;
+ char *name, *val;
+ if (!PyArg_ParseTuple(args, "ss:set_option", &name, &val)) return NULL;
+
+ printf("%s\n", name);
+ printf("%s\n", val);
+
+ CALLFAME(cfmsopt(&status, name, val));
+
+ Py_RETURN_NONE;
+}
+
+
+
static char cfame_open_doc[] = "open(database, access)\n\nOpens a FAME database and returns a FAME db idenifier.";
static PyObject *
cfame_open(PyObject *self, PyObject *args)
{
int status;
- int dbkey, access, large;
+ int dbkey, access;
const char *dbname;
- if (!PyArg_ParseTuple(args, "sii:open", &dbname, &access, &large)) return NULL;
+ if (!PyArg_ParseTuple(args, "si:open", &dbname, &access)) return NULL;
- if (access == HOMODE || access == HCMODE) {
-
- if (large) { CALLFAME(cfmsopt(&status, "DBSIZE", "LARGE")); }
- else { CALLFAME(cfmsopt(&status, "DBSIZE", "STANDARD")); }
- }
-
CALLFAME(cfmopdb (&status, &dbkey, dbname, access));
return PyInt_FromLong(dbkey);
@@ -975,6 +986,7 @@
{"read", cfame_read, METH_VARARGS, cfame_read_doc},
{"whats", cfame_whats, METH_VARARGS, cfame_whats_doc},
{"size", cfame_size, METH_VARARGS, cfame_size_doc},
+ {"set_option", cfame_set_option, METH_VARARGS, cfame_set_option_doc},
{"write_scalar", cfame_write_scalar, METH_VARARGS, cfame_write_scalar_doc},
{"write_series", cfame_write_series, METH_VARARGS, cfame_write_series_doc},
{"create", cfame_create, METH_VARARGS, cfame_create_doc},
More information about the Scipy-svn
mailing list