0

I have two files, main.py and module.py. Module.py is erased and re-written from another program (Qt designer), meaning I can't modify it myself.

Because of a Pyside-uic issue, I need to replace all calls to a function ( Qstring() ) by another one ( str() ) when I import Module.py.

How can I do that ?

1 Answer 1

2

I did it once in this way:

Inside my main program:

import module-fix.py

module-fix.py

import module.py as module
def fix_func():
  pass
module.func = fix_func

Hope it will help

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks a lot ! I'll accept this, but I hope someone find a better work-around, as it add a file only for 4 lines of code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.