[omniORB] Python packages/directories and generated code.
Nigel Rantor
wiggly at wiggly.org
Mon Jan 8 13:39:12 GMT 2007
Hi all,
I originally sent this to python-list some time ago and didn't really
get any satisfactory answer. I was wondering if anyone here who is using
python had come up against the same problem and how they solved it.
I'm a new to python so it may be that there is a good solution to this
that I just don't know.
Below is the message I sent to python list, that's why it's cuched in
more general terms but of course I'm talking about generating IDL
stubs/skels with omniORBpy/omniidl.
So, if I have a tool that generates python code for me (in my case,
CORBA stubs/skels) in a particular package is there a way of placing my
own code under the same package hierarchy without all the code living in
the same directory structure.
Ideally I would like something like the following:
package_dir/
top_level_package/
generated_code_package/
implementation_code_package/
but have two distinct directories that hold them so that I can simply
delete the generated code and regenerate it without worrying that
anything got left behind.
So, I want something like:
generated_package_dir/
top_level_package/
generated_code_package/
implementation_package_dir/
top_level_package/
implementation_code_package/
Whilst I can create this structure, and add 'generated_package_dir' and
'implementation_package_dir' to PYTHONPATH the fact that both
directories contain 'top_level_package' seems to be causing clashes,
perhaps because there are multiple __init__.py files for
'top_level_package'?
I know that this is possible in Java, Perl and C++ so I am finding it
hard to believe I can't do the same in Python, I just think I'm too new
to know how.
I have spent most of this morning searching through all the docs I can
find, searching on USENET and the web to no avail.
Any help or pointers greatly appreciated.
Regards,
n
More information about the omniORB-list
mailing list