ecell/ecell3 — pull request #14 by naito (2013-10-29 00:28:14+00:00)
Title: Imprement LoggerStub.remove() in pyecell

removeLogger() method is implemented in ecell/pyecell/ecell/_ecs.cpp.
Up to now, delete() method has been implemented in ecell/pyecell/ecell/LoggerStub.py, but "self.theSimulator().deleteLogger( self.theFullPNString ) " is invalid because deleteLogger() is not implemented in _ecs.cpp.
I change the method's name delete() to remove() according to libecs, in which a method's name "removeLogger()" is already used.
LoggerStub.delete() remains as a duplicate of LoggerStub.remove().

These changes work as following on ubuntu12.04:

$ ecell3-session -f simple.eml
ecell3-session [ E-Cell SE Version 3.2.3pre2, on Python Version 2.7.3 ]
Copyright (C) 1996-2012 Keio University.
Copyright (C) 2005-2009 The Molecular Sciences Institute.
More info: http://www.e-cell.org/software
>> S = createLoggerStub("Variable:/:S:Value")
>> S.create()
>> getLoggerList()
['Variable:/:S:Value']
>> S.getData()
array([[ 0., 1000000.]])
>> run(10)
>> S.getData()
array([[ 0.00000000e+00, 1.00000000e+06],
[ 1.00000000e-03, 9.99993759e+05],
[ 2.00000000e-03, 9.99987517e+05],
...,
[ 9.99900000e+00, 9.39499867e+05],
[ 1.00000000e+01, 9.39494004e+05],
[ 1.00000000e+01, 9.39494004e+05]])
>> S.remove()
>> getLoggerList()
[]
>> S.getData()
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/ecell/LoggerStub.py", line 95, in getData
aStartTime = self.getStartTime()
File "/usr/local/lib/python2.7/dist-packages/ecell/LoggerStub.py", line 118, in getStartTime
return self.theSimulator().getLoggerStartTime( self.theFullPNString )
RuntimeError: NotFound: logger [Variable:/:S:Value] not found
>> S.create()
>> run(10)
>> S.getData()
array([[ 1.00000000e+01, 9.39494004e+05],
[ 1.00010000e+01, 9.39488140e+05],
[ 1.00020000e+01, 9.39482276e+05],
...,
[ 1.99980000e+01, 8.82660001e+05],
[ 1.99990000e+01, 8.82654492e+05],
[ 2.00000000e+01, 8.82648983e+05]])
>>