0

I have a dict defined in a file in a separate directory. Now, to import such a dict in a different file, have declared the dict as global, then in other file have done like this:

import bin.postprocess-exe import ret P.S: the path is bin/postprocess-exe.py where the dict(ret) is declared.

When I am giving this, I am getting error: from bin.postprocess-exe import ret_val ^ SyntaxError: invalid syntax

Can somebody please help.

Thanks a lot

SudipM
  • 416
  • 7
  • 14
  • 1
    You can't have a module named `postprocess-exe`. That is invalid. You could rename it to `postprocess_exe`... – zvone May 05 '18 at 20:14
  • Thanks a lot, didn't know it, however when I renamed the file, it breaks something else, neverthless, very helpful....thanks a lot – SudipM May 06 '18 at 04:54

0 Answers0