|
From: L. C. <l.c...@gm...> - 2011-04-20 21:50:32
|
Why are you using an array anyways? Array has a built in function to do so. It's array.tolist(), there's also array.fromlist(LIST), check the docs: http://docs.python.org/library/array.html This is assuming you are using the reg python array and not the NumPy array. Leonardo On Wed, Apr 20, 2011 at 5:41 PM, Lawrence Abbott <la...@gm...> wrote: > It seems you are correct. If I convert the array (which is one > dimensional) to a list then I can read and write. Its a little clumsy > but will do for now.. unless someone wants to add array support :) > > Lawrie > > On Thu, Apr 21, 2011 at 5:02 AM, L. Canessa <l.c...@gm...> wrote: > > As far as I know, Configobj doesn't handle arrays. It does handle lists > > though. > > I am by no means an expert. > > > > Take a quick read through configobj.py. > > > > Leonardo > > > > > > On Wed, Apr 20, 2011 at 4:19 PM, Lawrence Abbott <la...@gm...> > wrote: > >> > >> Hi, I've need to add an array to the end af my configobj file but am > >> getting an error when I try and read back. line 19 is line starting > >> with DATA . Does configobj handle arrays? > >> > >> > >> configobj.UnreprError: Unknown name or type in value at line 19. > >> > >> ---cut--- > >> [INFO] > >> Customer = 'Customer' > >> Site = 'Site' > >> Satellite = 'Satellite' > >> Transponder = 'Transponder' > >> CarrierDB = 'CXxxxx' > >> Comment = 'Add comment here' > >> [PLOT_DATA] > >> [[11-04-21_04:05]] > >> DATA = array([-84.06, -84.26, -83.96, -83.76, -84.8 , -84.06, -84.03, > >> -83.83, > >> -84.03, -83.96, -84.1 , -84.16, -84.23, -84.26, -84.13, -83.6 , > >> -83.9 , -83.63, -83.9 , -83.8 , -83.96, -84.5 , -84. , -84.2 , > >> -83.96, -83.96, -83.96, -84. , -84.03, -84.36, -83.9 , -84. , > >> -84. , -83.5 , -83.86, -84.13, -83.96, -84.23, -84.3 , -84. , > >> -83.66, -83.6 , -84. , -84.7 , -84.2 , -83.93, -84.2 , -84.26, > >> ---cut--- > >> > >> > >> > ------------------------------------------------------------------------------ > >> Benefiting from Server Virtualization: Beyond Initial Workload > >> Consolidation -- Increasing the use of server virtualization is a top > >> priority.Virtualization can reduce costs, simplify management, and > improve > >> application availability and disaster protection. Learn more about > >> boosting > >> the value of server virtualization. > http://p.sf.net/sfu/vmware-sfdev2dev > >> _______________________________________________ > >> Configobj-develop mailing list > >> Con...@li... > >> https://lists.sourceforge.net/lists/listinfo/configobj-develop > > > > > > > ------------------------------------------------------------------------------ > > Benefiting from Server Virtualization: Beyond Initial Workload > > Consolidation -- Increasing the use of server virtualization is a top > > priority.Virtualization can reduce costs, simplify management, and > improve > > application availability and disaster protection. Learn more about > boosting > > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > > _______________________________________________ > > Configobj-develop mailing list > > Con...@li... > > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > > > > > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |