Home Bug Reports

Python: #include/import problem with slice2py

hiaslhiasl Member Matthias WeberOrganization: University of Erlangen-NurembergProject: This baby is still nameless
Hi,

including a slice from
#include "../../a_1/b_2/c_3.ice"

slice2pys into

import .._.._a_1_b_2_c_3_ice

which leads to an Syntax Error.

Bye,
Matthias

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Section 22.15 of the Ice manual describes the semantics of include files in the Python language mapping. It is the user's responsibility to ensure that #include statements are translated into an equivalent import statement that is appropriate for your environment.

    For example, if you include the option -I../.. when running slice2py, then the import statement becomes

    import a_1_b_2_c_3_ice

    See the Ice manual for more information.

    Take care,
    - Mark
Sign In or Register to comment.