Issue 3349: Python Issue: IDL generated module names (python-ftf) Source: Camros Corporation (Mr. Jeffrey A. Marshall, jam@camros.com) Nature: Uncategorized Issue Severity: Summary: The example in Section 1.2 "Using Scoped Names" states that: module M { <IDL-deleted> }; "would introduce a module M.py, which contains the following definitions:" This section never describes how the programmer gets at those names, I assume that if you want the definitions from module M, then you say: "import M". This introduces a disgusting and serious flaw in the mapping in that IDL compilers need to fake out the python module system and "update" IDL files. Resolution: rejected, issue closed Revised Text: Actions taken: February 22, 2000: received issue October 10, 2000: closed issue Discussion: Mapping IDL modules and to Python modules and packages is intentional, to simplify usage of these mapped construct by the programmer. End of Annotations:===== Date: Tue, 22 Feb 2000 15:55:57 -0500 (EST) Message-Id: <200002222055.PAA22673@emerald.omg.org> To: python-ftf@omg.org, issues@omg.org Subject: Python Issue: IDL generated module names From: "Jeffrey A. Marshall" X-Mailer: TWIG 2.1.1 Content-Type: text X-UIDL: ZRJe9Ej]!!FBXd9a+%e9 The example in Section 1.2 "Using Scoped Names" states that: module M { }; "would introduce a module M.py, which contains the following definitions:" This section never describes how the programmer gets at those names, I assume that if you want the definitions from module M, then you say: "import M". This introduces a disgusting and serious flaw in the mapping in that IDL compilers need to fake out the python module system and "update" IDL files. For example: MyFile.idl: module M { module N { ... }; }; Would most likely result in something like: M/__init__.py: import MyFile_idl M/MyFile_idl.py: M = imp.new_module ("M") # other IDL generated goodies Now if we have another IDL file: YourFile.idl: module M { module Z { ... }; }; The IDL compiler has to go back and update M/__init__.py Another issue here is that if YourFile.idl has: module M { interface MyInterface { }; }; The IDL compiler will create a M.py file. To clarify: if one assumes that the programmer imports a module name, the the IDL compiler needs to keep updating the __init__.py file within the module's directory. This is disgusting. We really need to specify what file names get generated by the IDL compiler and how developers import the generated python code. -- Jeffrey A. Marshall Camros Corporation Email jam@camros.com Voice 703-876-1700 ext. 10 Fax 703-876-1818 http://www.camros.com/