Changeset 790 for trunk/python/Rappture
- Timestamp:
- Jul 30, 2007, 6:36:25 PM (17 years ago)
- Location:
- trunk/python/Rappture
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/Rappture/Library.cc
r787 r790 26 26 27 27 /* 28 * Check to see if this object is a Rappture. Library object.28 * Check to see if this object is a Rappture.library object. 29 29 * This does not check to see if the object is correctly 30 30 * initialized. To check for correct object type and … … 39 39 if (o != NULL) { 40 40 if ( (*(o->ob_type->tp_name) == 'R') 41 && (strcmp(o->ob_type->tp_name,"Rappture. Library") == 0) ) {41 && (strcmp(o->ob_type->tp_name,"Rappture.library") == 0) ) { 42 42 retval = 1; 43 43 } … … 48 48 49 49 /* 50 * Check to see if this object is a Rappture. Library object50 * Check to see if this object is a Rappture.library object 51 51 * and is correctly initialized 52 52 * 53 53 * This function calls RpLibraryObject_Check internally, and is used 54 54 * in most of the internal functions to check if an object being passed 55 * in by the user is a valid Rappture. Library object55 * in by the user is a valid Rappture.library object 56 56 */ 57 57 … … 97 97 if (!PyArg_ParseTuple(args, "O", &inObj)) { 98 98 PyErr_Format(PyExc_TypeError, 99 " Library() takes 1 argument, a file name or a Rappture Library Object");99 "library() takes 1 argument, a file name or a Rappture Library Object"); 100 100 return -1; 101 101 } … … 738 738 PyObject_HEAD_INIT(NULL) 739 739 0, /*ob_size*/ 740 "Rappture. Library", /*tp_name*/740 "Rappture.library", /*tp_name*/ 741 741 sizeof(RpLibraryObject), /*tp_basicsize*/ 742 742 0, /*tp_itemsize*/ … … 758 758 0, /*tp_as_buffer*/ 759 759 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ 760 "Rappture. Library Object", /*tp_doc*/760 "Rappture.library Object", /*tp_doc*/ 761 761 0, /*tp_traverse*/ 762 762 0, /*tp_clear*/ … … 991 991 992 992 PyMODINIT_FUNC 993 init Library(void)993 initlibrary(void) 994 994 { 995 995 PyObject *m; … … 1002 1002 1003 1003 /* Create the module and add the functions */ 1004 m = Py_InitModule3(" Library", Library_Methods, module_doc);1004 m = Py_InitModule3("library", Library_Methods, module_doc); 1005 1005 1006 1006 /* Add some symbolic constants to the module */ … … 1012 1012 1013 1013 Py_INCREF(&RpLibraryObjectType); 1014 PyModule_AddObject(m, " Library", (PyObject*) &RpLibraryObjectType);1014 PyModule_AddObject(m, "library", (PyObject*) &RpLibraryObjectType); 1015 1015 1016 1016 Py_XINCREF(ErrorObject); -
trunk/python/Rappture/__init__.py
r787 r790 8 8 import Units 9 9 import Utils 10 import Library11 10 import encoding -
trunk/python/Rappture/unittest_library.py
r787 r790 17 17 18 18 def setUp(self): 19 self.lib = Rappture. Library.Library("test.xml")20 self.lib2 = Rappture. Library.Library("test.xml")21 # self.lib3 = Rappture. Library.Library()19 self.lib = Rappture.library("test.xml") 20 self.lib2 = Rappture.library("test.xml") 21 # self.lib3 = Rappture.library() 22 22 23 23 def tearDown(self): … … 217 217 218 218 def setUp(self): 219 self.lib = Rappture. Library.Library("test.xml")219 self.lib = Rappture.library("test.xml") 220 220 221 221 def tearDown(self): … … 258 258 259 259 def setUp(self): 260 self.lib = Rappture. Library.Library("test.xml")260 self.lib = Rappture.library("test.xml") 261 261 262 262 def tearDown(self): … … 344 344 345 345 def setUp(self): 346 self.lib = Rappture. Library.Library("test.xml")346 self.lib = Rappture.library("test.xml") 347 347 348 348 def tearDown(self): … … 484 484 485 485 def setUp(self): 486 self.lib = Rappture. Library.Library("test.xml")486 self.lib = Rappture.library("test.xml") 487 487 488 488 def tearDown(self): … … 537 537 538 538 def setUp(self): 539 self.lib = Rappture. Library.Library("test.xml")539 self.lib = Rappture.library("test.xml") 540 540 541 541 def tearDown(self):
Note: See TracChangeset
for help on using the changeset viewer.