[XML-SIG] [Bug #123095] [4ODS] Problems with --package option in OdlParse

noreply@sourceforge.net noreply@sourceforge.net
Tue, 21 Nov 2000 11:32:02 -0800

Bug #123095, was updated on 2000-Nov-21 11:32
Here is a current snapshot of the bug.

Project: Python/XML
Category: 4Suite
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: [4ODS] Problems with --package option in OdlParse

Details: Hi; 
I just started playing with 4ODS last night and it looks very nice! Thanks for the work so far on it.

I was having a bit of problem with the stubs generated via OdlParse with the --package option. With the following odl file:

module Top {
  class Two;

  class One {
    relationship list<Two> my_twos inverse Two::my_one;

  class Two {
    relationship One my_one inverse One::my_twos;

I generated stubs using:
$ OdlParse --package=Foo -ifp test_top top.odl

If you look at the stubs generated:
$ more Top/One/__init__.py
	def add_my_twos(self,target,inverse=1):
		from Foo.Top import Two 

The import just imports the class as Two, but it is still trying to use the class as if it was imported from Top.Two  This leads to import errors when you try to import these stubs to subclass them.

I traced the places where both lines are generated, but couldn't find a decent fix since I wasn't sure how to set whether or not --package was specified. Apologies.

I hope this helps and is not already known. Thanks again for all your hard work on this code.


For detailed info, follow this link: