Adding to a module's __dict__?
steve at holdenweb.com
Tue Mar 2 17:14:37 CET 2010
Roy Smith wrote:
> On Mar 2, 8:33 am, Steve Holden <st... at holdenweb.com> wrote:
>> And how important is it to make sure that whatever data your program
>> processes doesn't overwrite the actual variable names you want to use to
>> program the processing?
> Oh, I see what you're saying. You're thinking I was going to machine-
> process the C header file and pattern-match the #define statements?
> Actually, I was just hand-copying the values, and was looking for a
> way to reduce typing.
> But, I suppose if I were to machine-process the header files, that
> would be a concern. I suppose in that case I would make sure I only
> inserted variables which matched a particular pattern (ie, "[A-Z]+_[A-
> Z][A-Z0-9]+"). In fact, now that you got me thinking in that
> Somewhat sadly, in my case, I can't even machine process the header
> file. I don't, strictly speaking, have a header file. What I have is
> a PDF which documents what's in the header file, and I'm manually re-
> typing the data out of that. Sigh.
Don't worry. Now you have revealed the *real* problem you may well find
there are c.l.py readers who can help! Python can read PDFs ...
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS: http://holdenweb.eventbrite.com/
More information about the Python-list