Ticket #85 (new defect)

Opened 4 months ago

relative imports do not work with pyraf

Reported by: dencheva Assigned to: somebody
Priority: normal Milestone:
Component: none Version:
Severity: normal Keywords:
Cc:

Description

When importing a script which uses relative imports I get an error:

---> 8 from .. mappings import inst_mappings, ins_spec_kw, DEGTORAD, RADTODEG, basic_wcs

<type 'exceptions.TypeError?'>: _irafImport() takes at most 4 arguments (5 given)

Comment: Adding 'level=-1' to the parameters of irafimport._irafImport and passing it to _originalImport fixes this problem. However this fix is python 2.5 specific because relative imports are new in Python 2.5.