[Python-Dev] RE: Python and Temple of Elemental Evil

Delaney, Timothy C (Timothy) tdelaney at avaya.com
Thu Dec 11 19:01:58 EST 2003

> From: Guido van Rossum
> > I'm forwarding this to python-dev as it deals with potential
> > modifications to the python code base (including offer of a patch :)
> > Guido has the final say anyway ...
> The formatting of the message and the extensive quoting and references
> to a game made me lose track of what was suggested.  Could you
> summarize a bit?

OK - distilling down to the minimum I think is useful ...

[ Steve was unable to work out how to redirect stderr, stdout and stdin ]

[ I suggested using sys.stdin, etc - subject to the caveat that it doesn't
  work for os.system, etc - there may be a documentation issue here though
  I don't think so - finding the relevant info in the help was simple ].

[ Steve was unable to work out how to import from a proprietory format (.dat) ]

[ I suggested an import hook and pointed to PEP 302 (although ToEE uses
  Python 2.2). There may be a need for further documentation/pointers here. ]

[ The following is relevant to python-dev IMO - I should have trimmed further
  than I did in the first case :( Steve suggests that the file object semantics
  did not meet his needs, and offers a patch which I expect would be rejected,
  but may at least give a use case for consideration. ]

> A third step can be taken 
> (which replaces the
> Python fileobject's calls to fopen/etc with the game ones, 
> but I think it's
> a better idea for the developer to write a python module that 
> encapsulates
> this on their own anyway.

Not quite sure what you mean here. What are the semantics of the file object calls that are different to what you needed?

> Traditionally we (here at Troika) have done all of the above with a
> structure/array of function pointers and initialize it to the 
> defaults. Just
> wanted to know if I were to provide a diff/patch would you 
> guys want to
> include it. Also if I do, what version should I make the 
> patch for, 2.3.2 or
> CVS or? Otherwise I'll just try to get Troika to host the patch on our
> website incase other developers want to use it.

A patch is definitely welcome, even if not accepted. In general, patches should be made against the latest development branch (2.4) and if appropriate backported to the maintenance branch (2.3.3). However, since your proposals sound like new functionality, they would not be appropriate for a 2.3.x release.


Tim Delaney

More information about the Python-Dev mailing list