Francesc Altet <[EMAIL PROTECTED]> writes:

> El dc 22 de 11 del 2006 a les 15:05 +0100, en/na Berthold Höllmann va
> escriure:
>> I tried to do some fancy things utilizing trMap which work with older
>> pyTable versions, but seems to lead to strange errors in pyTables
>> 1.3.3.
>
> Mmm, that's strange, becaure there exists some tests for trMap (see
> test_basics.py) that seems to pass just fine.

See my other mail for a failing example.

>> I can't predict the names of the groups and arrays I want to write. To
>> avoid the usage of reserved names I want to precede each node name
>> with a '_' for Python usage. I used 
>> 
>> class _myTrMap(dict):
>>     def get(self, one, two):
>>         return self[one]
>>     def __getitem__(self, item):
>>         return item[1:]
>> 
>> as my dictionary class, but this does not work anymore. I now extend
>> the files trMap prior to accessing the nodes and it seems to work for
>> me now.
>
> Starting from some versions ago (I don't remember exactly when),
> PyTables lets you use whatever string as a node name. The only thing is
> that if these names are Python reserved words, you cannot use them in
> natural naming; but there is always File.getNode() that always works.

Hey, that tip really saved my day. It seems, I made a huge step
forward in my conversion process in putting aside trMap. Thanks.

Kind regards

Berthold Höllmann
-- 
Germanischer Lloyd AG
CAE Development
Vorsetzen 35
20459 Hamburg
Phone: +49(0)40 36149-7374
Fax: +49(0)40 36149-7320
e-mail: [EMAIL PROTECTED]
Internet: http://www.gl-group.com



This e-mail and any attachment thereto may contain confidential information 
and/or information protected by intellectual property rights for the exclusive 
attention of the intended addressees named above. Any access of third parties 
to this e-mail is unauthorised. Any use of this e-mail by unintended recipients 
such as total or partial copying, distribution, disclosure etc. is prohibited 
and may be unlawful. When addressed to our clients the content of this e-mail 
is subject to the General Terms and Conditions of GL's Group of Companies 
applicable at the date of this e-mail. 

If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

GL's Group of Companies does not warrant and/or guarantee that this message at 
the moment of receipt is authentic, correct and its communication free of 
errors, interruption etc.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to