Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Crash on accessing module level functions in cdef class
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ian Bell  
View profile  
 More options Sep 29 2012, 11:22 pm
From: Ian Bell <ian.h.b...@gmail.com>
Date: Sat, 29 Sep 2012 23:21:51 -0400
Local: Sat, Sep 29 2012 11:21 pm
Subject: Crash on accessing module level functions in cdef class

If you have a cdef class, when you call dir() on an instance of the class,
all the module-level functions are also listed.  When you try to get one of
these functions using either dot access or getattr(), python crashes.  I
don't want them to show up in dir() since they are not methods of the
class.  I think this is a bug.

In any case, what I am trying to do is create HDF5 files by walking through
nested data structure with classes and cdef classes as well as classes
nested in lists and dictionaries.  It is really quite a mess.

Ian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian Bell  
View profile  
 More options Sep 30 2012, 12:23 am
From: Ian Bell <ian.h.b...@gmail.com>
Date: Sun, 30 Sep 2012 00:23:10 -0400
Local: Sun, Sep 30 2012 12:23 am
Subject: Re: Crash on accessing module level functions in cdef class

Sorry, please disregard message.  User error.  I created an infinitely
recursive loop.  Oops

Ian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Barker  
View profile  
 More options Sep 30 2012, 1:53 pm
From: Chris Barker <chris.bar...@noaa.gov>
Date: Sun, 30 Sep 2012 10:52:44 -0700
Local: Sun, Sep 30 2012 1:52 pm
Subject: Re: [cython-users] Crash on accessing module level functions in cdef class
Hi,

It seems you have solved your problem, but:

> In any case, what I am trying to do is create HDF5 files by walking through
> nested data structure with classes and cdef classes as well as classes
> nested in lists and dictionaries.

Are you writing HDF5 by hand? or calling the HDF5 libs?

If the former, are you working on an implimentation or really just
something  that will handle you particular use-case of HDF?

If the later -- why not use one of the existing wrappers? (pyhdf and PyTables)

-- just curious, and wondering if you may be making strides towards a
python-native netecdf4 implementation...

-Chris
--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Bar...@noaa.gov


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian Bell  
View profile  
 More options Oct 2 2012, 2:58 am
From: Ian Bell <ian.h.b...@gmail.com>
Date: Tue, 2 Oct 2012 02:57:26 -0400
Local: Tues, Oct 2 2012 2:57 am
Subject: Re: [cython-users] Crash on accessing module level functions in cdef class

Chris,

For my purposes I am using h5py and my own recursive writer to build the
HDF5 file.  It can handle native data types - lists, dictionaries, integer,
float, string, etc..  I ignore bound and unbound methods.  It works for my
purposes and isn't really all that complicated.There are some obvious and
less-obvious limitations (dictionaries can only have string-based keys for
instance).  I've attached my code for this part to this email. There is
some other garbage for my project, but the HDF5Writer class is the one you
want.

Are there better tools out there that could theoretically take a very
deeply nested structure and automatically write it all in an approximately
parallel data structure within the HDF5 file?  It looks like neither pyhdf
nor PyTables have the level of automaticness that I need.

Regards,
Ian

-Chris

  HDF5_plugin.py
4K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Barker  
View profile  
 More options Oct 2 2012, 11:51 am
From: Chris Barker <chris.bar...@noaa.gov>
Date: Tue, 2 Oct 2012 08:50:21 -0700
Local: Tues, Oct 2 2012 11:50 am
Subject: Re: [cython-users] Crash on accessing module level functions in cdef class

On Mon, Oct 1, 2012 at 11:57 PM, Ian Bell <ian.h.b...@gmail.com> wrote:
> For my purposes I am using h5py and my own recursive writer to build the
> HDF5 file.  It can handle native data types - lists, dictionaries, integer,
> float, string, etc..  I ignore bound and unbound methods.  It works for my
> purposes and isn't really all that complicated.There are some obvious and
> less-obvious limitations (dictionaries can only have string-based keys for
> instance).  I've attached my code for this part to this email. There is some
> other garbage for my project, but the HDF5Writer class is the one you want.

> Are there better tools out there that could theoretically take a very deeply
> nested structure and automatically write it all in an approximately parallel
> data structure within the HDF5 file?

I don't think so, no.

It sounds like a pretty cool idea, though.

-Chris

--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Bar...@noaa.gov


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions Older topic »